CMake: Add conditional check for options

Signed-off-by: Bimal Jacob <bimal.jacob@rockwellcollins.com>
Signed-off-by: Santosh Multhalli <santosh.multhalli@rockwellcollins.com>
This commit is contained in:
Bimal Jacob 2015-11-19 09:55:53 -06:00 committed by Tristan Penman
parent 0c645c53f3
commit 0c5de11cb2

View File

@ -5,6 +5,7 @@ option (INSTALL_HEADERS "Install valijson Headers." TRUE)
option (BUILD_EXAMPLES "Build valijson Examples." FALSE)
option (BUILD_TESTS "Build valijson Tests." FALSE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ")
if (BUILD_TESTS OR BUILD_EXAMPLES)
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
if(VALIJSON_CXX11_ADAPTERS STREQUAL "disabled")
message(STATUS "Building with C++11 support disabled")
@ -110,4 +111,8 @@ endif()
target_link_libraries(test_suite ${TEST_LIBS} ${Boost_LIBRARIES})
target_link_libraries(custom_schema ${Boost_LIBRARIES})
target_link_libraries(external_schema ${Boost_LIBRARIES})
endif()
if (INSTALL_HEADERS )
install(DIRECTORY include/ DESTINATION include )
endif()