summaryrefslogtreecommitdiff
path: root/test/libapt/CMakeLists.txt
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2018-05-04 18:24:57 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2018-05-04 18:42:37 +0200
commit1d77c915005f7630949e2ce706055ee3235009b6 (patch)
treed10b246f29198a4085e2923a53e4d8bafff73bcc /test/libapt/CMakeLists.txt
parent39d9e217a22901892647499ee695ba472a111d25 (diff)
Prevent GTest from flooding us with compiler warnings
GTest has a bunch of undefined macros which causes the compiler to spit out warnings for each one on each test file. There isn't much we can do, so we just disable the warning for the testcases. Other warnings like sign-promo and sign-compare we can avoid by being more explicit about our expected integer constants being unsigned. As we are just changing testcases, there is no user visible change which would deserve to be noted in the changelog. Gbp-Dch: Ignore Reported-By: gcc-8
Diffstat (limited to 'test/libapt/CMakeLists.txt')
-rw-r--r--test/libapt/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/libapt/CMakeLists.txt b/test/libapt/CMakeLists.txt
index 00425d7f4..cc1d024f8 100644
--- a/test/libapt/CMakeLists.txt
+++ b/test/libapt/CMakeLists.txt
@@ -22,6 +22,11 @@ if(NOT GTEST_FOUND AND EXISTS ${GTEST_ROOT})
endif()
if(GTEST_FOUND)
+ # gtest produces some warnings with the set of warnings we activate,
+ # so disable the offending warnings while compiling tests for now
+ add_optional_compile_options(Wno-undef)
+ add_optional_compile_options(Wno-ctor-dtor-privacy)
+
# Definition of the C++ files used to build the test binary - note that this
# is expanded at CMake time, so you have to rerun cmake if you add or remove
# a file (you can just run cmake . in the build directory)