diff --git a/CMakeLists.txt b/CMakeLists.txt index 199f835..2502eb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,25 +14,25 @@ endif() option(CPPAST_ENABLE_ASSERTIONS "whether or not to enable internal assertions for the cppast library" ${default_assertions}) option(CPPAST_ENABLE_PRECONDITION_CHECKS "whether or not to enable precondition checks" ON) -option(CPPAST_BUILD_TEST "whether or not to build the tests" ON) -option(CPPAST_BUILD_EXAMPLE "whether or not to build the examples" ON) -option(CPPAST_BUILD_TOOL "whether or not to build the tool" ON) +option(CPPAST_BUILD_TEST "whether or not to build the tests" OFF) +option(CPPAST_BUILD_EXAMPLE "whether or not to build the examples" OFF) +option(CPPAST_BUILD_TOOL "whether or not to build the tool" OFF) option(BUILD_TESTING "build test" OFF) # The ctest variable for building tests -if((${CPPAST_BUILD_TEST} OR ${BUILD_TESTING}) AND (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)) +if((${CPPAST_BUILD_TEST} OR ${BUILD_TESTING}) OR (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)) set(build_test ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # for the self integration test else() set(build_test OFF) endif() -if(${CPPAST_BUILD_EXAMPLE} AND (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)) +if(${CPPAST_BUILD_EXAMPLE} OR (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)) set(build_example ON) else() set(build_example OFF) endif() -if(${CPPAST_BUILD_TOOL} AND (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)) +if(${CPPAST_BUILD_TOOL} OR (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)) set(build_tool ON) else() set(build_tool OFF)