Files
autocmake/test/extra_cmake_options/src/CMakeLists.txt
Radovan Bast fd8ec93851 the default setup script name becomes "setup"
it can be changed in autocmake.cfg
2015-10-12 15:30:51 +02:00

14 lines
342 B
CMake

# here we test setting -DENABLE_SOMETHING=OFF -DFOO=ON
# in the setup script
option(ENABLE_SOMETHING "Enable something" ON)
option(ENABLE_FOO "Enable FOO" OFF)
if(ENABLE_SOMETHING)
message(FATAL_ERROR "This test failed")
endif()
if(NOT ENABLE_FOO)
message(FATAL_ERROR "This test failed")
endif()
add_executable(example example.cpp)