Commit 33c9c2ef authored by Brendan Gregg's avatar Brendan Gregg Committed by GitHub

Merge pull request #363 from cyphar/cmake-test

cmake: add BUILD_TESTING support
parents f22cb87a a56ab12d
...@@ -21,7 +21,7 @@ add_compile_options("-Wno-format-security") ...@@ -21,7 +21,7 @@ add_compile_options("-Wno-format-security")
#add_compile_options("-Wstrict-overflow=5") #add_compile_options("-Wstrict-overflow=5")
#add_compile_options("-Wdisabled-optimization") #add_compile_options("-Wdisabled-optimization")
enable_testing() include(CTest)
if (STATIC_LINKING) if (STATIC_LINKING)
set(CMAKE_EXE_LINKER_FLAGS "-static") set(CMAKE_EXE_LINKER_FLAGS "-static")
...@@ -59,7 +59,9 @@ include_directories(${CLANG_INCLUDE_DIRS}) ...@@ -59,7 +59,9 @@ include_directories(${CLANG_INCLUDE_DIRS})
add_subdirectory(src/arch) add_subdirectory(src/arch)
add_subdirectory(src/ast) add_subdirectory(src/ast)
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(tests) if (BUILD_TESTING)
add_subdirectory(tests)
endif()
add_subdirectory(resources) add_subdirectory(resources)
add_subdirectory(tools) add_subdirectory(tools)
add_subdirectory(man) add_subdirectory(man)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment