add possibility to pass options to cmake via setup.py
This commit is contained in:
13
test/extra_cmake_options/src/CMakeLists.txt
Normal file
13
test/extra_cmake_options/src/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# here we test setting -DENABLE_SOMETHING=OFF -DFOO=ON
|
||||
# setup.py 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)
|
Reference in New Issue
Block a user