diff options
author | Alec Thomas <alec@swapoff.org> | 2013-01-06 16:57:44 -0500 |
---|---|---|
committer | Alec Thomas <alec@swapoff.org> | 2013-01-06 16:57:44 -0500 |
commit | 6bb2ed010c3892b3c290e76df0d37583448cc6c7 (patch) | |
tree | 2367cad019e0dafd682481ab2b314a5c2485f047 | |
parent | 59f62b5c0df10be433b9380777e4d5a649d03d95 (diff) |
Make testing optional.
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1da9770..be77681 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,8 +46,6 @@ require(HAS_CXX11_LONG_LONG "C++11 lambdas") message("-- Checking misc features") require(HAVE_STDINT_H "stdint.h") -enable_testing() -find_package(GTest REQUIRED) set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF) @@ -69,10 +67,14 @@ include_directories( ${GTest_INCLUDE_DIR} ) -create_test(entity_test entityx/Entity_test.cc) -create_test(component_test entityx/Components_test.cc) -create_test(event_test entityx/Event_test.cc) -create_test(system_test entityx/System_test.cc) +if (BUILD_TESTING) + enable_testing() + find_package(GTest REQUIRED) + create_test(entity_test entityx/Entity_test.cc) + create_test(component_test entityx/Components_test.cc) + create_test(event_test entityx/Event_test.cc) + create_test(system_test entityx/System_test.cc) +endif (BUILD_TESTING) file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/entityx/*.h") |