src_prepare-overlay/dev-libs/properties-cpp/files/optional_tests.patch
Alfred Wingate b0813da4d0
dev-libs/properties-cpp: add properties-cpp
Package-Manager: Portage-3.0.9, Repoman-3.0.2
2020-12-23 19:58:36 +02:00

23 lines
660 B
Diff

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 180498f..ac5e66c 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,3 +1,11 @@
+option(
+ PROPERTIES_CPP_BUILD_TESTS
+ "Build tests"
+ ON
+)
+
+if (PROPERTIES_CPP_BUILD_TESTS)
+
set (OLD_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
# Don't treat warnings as errors in 3rd_party/{gmock,cucumber-cpp}
string (REPLACE " -Werror " " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
@@ -31,3 +39,5 @@ target_link_libraries(
add_test(properties_test ${CMAKE_CURRENT_BINARY_DIR}/properties_test)
add_test(signals_test ${CMAKE_CURRENT_BINARY_DIR}/signals_test)
+
+endif (PROPERTIES_CPP_BUILD_TESTS)