Test: Only fetch Google Test if testing is enabled
# ~~~
include (LibAddMacros)
+
+if (ENABLE_TESTING)
include (DownloadProject)
if (CMAKE_VERSION VERSION_LESS 3.2)
@@ -29,6 +31,7 @@ set_property (TARGET gmock PROPERTY COMPILE_FLAGS "-Wno-undef -Wno-missing-field
set_property (TARGET gmock_main PROPERTY COMPILE_FLAGS "-Wno-undef")
set_property (TARGET gtest PROPERTY COMPILE_FLAGS "-Wno-undef -Wno-missing-field-initializers")
set_property (TARGET gtest_main PROPERTY COMPILE_FLAGS "-Wno-undef")
+endif (ENABLE_TESTING)
# don't call add_headers in a loop
add_headers (HDR_FILES)
