[ros-dev] [ros-diffs] [akhaldi] 48535: [CMAKE] - Add calc to build.
Colin Finck
mail at colinfinck.de
Sun Aug 22 12:26:47 UTC 2010
akhaldi at svn.reactos.org wrote:
> +++ branches/cmake-bringup/base/applications/calc/CMakeLists.txt
> [...]
>
> +file(GLOB_RECURSE SOURCE *.c)
> +list(REMOVE_ITEM SOURCE
> + ${CMAKE_CURRENT_SOURCE_DIR}/fun_mpfr.c
> + ${CMAKE_CURRENT_SOURCE_DIR}/rpn_mpfr.c
> + ${CMAKE_CURRENT_SOURCE_DIR}/utl_mpfr.c)
Should GLOB_RECURSE and later removing unwanted source files really be
the way to go?
The only advantage I see are smaller CMakeLists files.
On the contrary, it is quite an uncommon way and just adding a single
unrelated file into an application's directory could render it unbuildable.
Additionally, please take a look at
http://public.kitware.com/pipermail/cmake/2010-July/037833.html.
According to this user, CMake cannot automatically detect added files
when using GLOB_RECURSE.
In my opinion, we should list every source file to be included to
prevent unexpected side effects.
Cheers,
Colin
More information about the Ros-dev
mailing list