Add tool infrastructure
This commit is contained in:
parent
a8e2676f36
commit
d66d6d26af
6 changed files with 51 additions and 2 deletions
|
|
@ -15,11 +15,28 @@ option(CPPAST_ENABLE_ASSERTIONS "whether or not to enable internal assertions fo
|
|||
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_TOOL "whether or not to build the tool" ON)
|
||||
option(BUILD_TESTING "build test" OFF) # The ctest variable for building tests
|
||||
|
||||
if(${CPPAST_BUILD_TEST} OR ${BUILD_TESTING} OR (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||
set(build_test ON)
|
||||
else()
|
||||
set(build_test OFF)
|
||||
endif()
|
||||
|
||||
if(${CPPAST_BUILD_TOOL} OR (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||
set(build_tool ON)
|
||||
else()
|
||||
set(build_tool OFF)
|
||||
endif()
|
||||
|
||||
include(external/external.cmake)
|
||||
|
||||
add_subdirectory(src)
|
||||
if(CPPAST_BUILD_TEST)
|
||||
|
||||
if(${build_test})
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
if(${build_tool})
|
||||
add_subdirectory(tool)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue