Add CMake options to control assertion levels

This commit is contained in:
Jonathan Müller 2017-04-06 12:23:31 +02:00
commit a6f15d6334
3 changed files with 29 additions and 2 deletions

View file

@ -101,4 +101,10 @@ target_compile_definitions(cppast PUBLIC
CPPAST_LIBCLANG_SYSTEM_INCLUDE_DIR="${LIBCLANG_SYSTEM_INCLUDE_DIR}"
CPPAST_CLANG_BINARY="${CLANG_BINARY}"
CPPAST_CLANG_VERSION_STRING="${LLVM_VERSION}")
if(CPPAST_ENABLE_ASSERTIONS)
target_compile_definitions(cppast PUBLIC CPPAST_ENABLE_ASSERTIONS)
endif()
if(CPPAST_ENABLE_PRECONDITION_CHECKS)
target_compile_definitions(cppast PUBLIC CPPAST_ENABLE_PRECONDITION_CHECKS)
endif()
set_target_properties(cppast PROPERTIES CXX_STANDARD 11)