From 6e4681a86fc1d118571dac06ffa811a988a1066a Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 9 Sep 2017 08:32:39 +0100 Subject: Stable build --- lib/CMakeLists.txt | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'lib') diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 3fc37c0e..0f07326f 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -5,19 +5,21 @@ # See file LICENSE for more details # ---------------------------------------------------------------------------- -# Initializing google test -# prevents overriding the parent project's compiler/linter settings on windows -set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) +if(${ENABLE_TESTING}) + # Initializing google test + # prevents overriding the parent project's compiler/linter settings on windows + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -# Add googletest directly to our build. This defines -# the gtest and gtest_main targets. -add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/googletest") + # Add googletest directly to our build. This defines + # the gtest and gtest_main targets. + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/googletest") -# The gtest/gtest_main targets carry header search path -# dependencies automatically when using CMake 2.8.11 or -# later. Otherwise we have to add them here ourselves. -if (CMAKE_VERSION VERSION_LESS 2.8.11) - include_directories("${gtest_SOURCE_DIR}/include") + # The gtest/gtest_main targets carry header search path + # dependencies automatically when using CMake 2.8.11 or + # later. Otherwise we have to add them here ourselves. + if (CMAKE_VERSION VERSION_LESS 2.8.11) + include_directories("${gtest_SOURCE_DIR}/include") + endif() endif() # include headers for rapidjson, no need to build it -- cgit