David Demelier
2011-09-18 12:15:54 UTC
Hello,
I noticed that option() values are not checked when the option() command
is under a add_subdirectory() target.
Example:
-- a's CMakeLists.txt --
project(a C)
set(BUILD_DEMOS OFF)
add_subdirectory(extern/b)
-- extern/b's CMakeLists.txt --
project(b C)
option(BUILD_DEMOS "Enable the demos build" ON)
if (BUILD_DEMOS)
...
endif ()
Then when building the project a it will also enter the if BUILD_DEMOS
conditional.
What can I do now? :)
Cheers,
I noticed that option() values are not checked when the option() command
is under a add_subdirectory() target.
Example:
-- a's CMakeLists.txt --
project(a C)
set(BUILD_DEMOS OFF)
add_subdirectory(extern/b)
-- extern/b's CMakeLists.txt --
project(b C)
option(BUILD_DEMOS "Enable the demos build" ON)
if (BUILD_DEMOS)
...
endif ()
Then when building the project a it will also enter the if BUILD_DEMOS
conditional.
What can I do now? :)
Cheers,
--
David Demelier
David Demelier