From 1d77c915005f7630949e2ce706055ee3235009b6 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 4 May 2018 18:24:57 +0200 Subject: 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 --- test/libapt/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/libapt/CMakeLists.txt') 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) -- cgit v1.2.3