From 44dcccd16990d815dd4f1a62e27e934da89f40c7 Mon Sep 17 00:00:00 2001 From: Dirk Vanden Boer Date: Fri, 4 Nov 2016 21:34:58 +0100 Subject: [PATCH] Optional unit tests --- CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6507efde..56ee04e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,8 @@ project(sqlpp11 VERSION 0.1 LANGUAGES CXX) enable_testing() +option(ENABLE_TESTS "Build unit tests" On) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/") find_package(HinnantDate REQUIRED) @@ -104,9 +106,11 @@ install( ${ConfigPackageLocation} ) -add_subdirectory(tests) -add_subdirectory(test_types) -add_subdirectory(test_serializer) -add_subdirectory(test_static_asserts) -add_subdirectory(test_constraints) -add_subdirectory(test_scripts) +if(ENABLE_TESTS) + add_subdirectory(tests) + add_subdirectory(test_types) + add_subdirectory(test_serializer) + add_subdirectory(test_static_asserts) + add_subdirectory(test_constraints) + add_subdirectory(test_scripts) +endif() \ No newline at end of file