File tree 1 file changed +17
-15
lines changed
1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -230,23 +230,25 @@ endmacro(set_join)
230
230
###############################################################################
231
231
# enable gtest framework, valgrind, and collection of results
232
232
233
- enable_testing ()
234
- include (CTest)
235
-
236
- ### google test + mock - enable "make test" and add_test()
237
-
238
- # this fixes compilation with static libs on MSVC
239
- set (gtest_force_shared_crt ON CACHE BOOL "on" FORCE)
240
- if (NOT MSVC )
241
- # silence some warnings
242
- set (GTEST_SAVE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
243
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers -Wno-deprecated" )
244
- endif ()
233
+ if (SAMPLING_BUILD_TESTS)
234
+ enable_testing ()
235
+ include (CTest)
236
+
237
+ ### google test + mock - enable "make test" and add_test()
238
+
239
+ # this fixes compilation with static libs on MSVC
240
+ set (gtest_force_shared_crt ON CACHE BOOL "on" FORCE)
241
+ if (NOT MSVC )
242
+ # silence some warnings
243
+ set (GTEST_SAVE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
244
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-field-initializers -Wno-deprecated" )
245
+ endif ()
245
246
246
- add_subdirectory (extlib/googletest/googletest)
247
+ add_subdirectory (extlib/googletest/googletest)
247
248
248
- if (NOT MSVC )
249
- set (CMAKE_CXX_FLAGS "${GTEST_SAVE_CXX_FLAGS} " )
249
+ if (NOT MSVC )
250
+ set (CMAKE_CXX_FLAGS "${GTEST_SAVE_CXX_FLAGS} " )
251
+ endif ()
250
252
endif ()
251
253
252
254
################################################################################
You can’t perform that action at this time.
0 commit comments