Commit a56ab12d authored by Aleksa Sarai's avatar Aleksa Sarai

cmake: add BUILD_TESTING support

Currently tests/ requires pulling gtest from git, which is far from
ideal for distribution builds (not to mention we don't need to unit test
in an RPM build). So add the ability to disable tests/ builds.
Signed-off-by: default avatarAleksa Sarai <cyphar@cyphar.com>
parent 96389e4a
......@@ -21,7 +21,7 @@ add_compile_options("-Wno-format-security")
#add_compile_options("-Wstrict-overflow=5")
#add_compile_options("-Wdisabled-optimization")
enable_testing()
include(CTest)
if (STATIC_LINKING)
set(CMAKE_EXE_LINKER_FLAGS "-static")
......@@ -59,7 +59,9 @@ include_directories(${CLANG_INCLUDE_DIRS})
add_subdirectory(src/arch)
add_subdirectory(src/ast)
add_subdirectory(src)
add_subdirectory(tests)
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
add_subdirectory(resources)
add_subdirectory(tools)
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