From 09a6bd820eb04570226b16ebd8cd7dcb49dac5d8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 28 Sep 2016 16:00:17 -0400 Subject: CTestCustom: Suppress PGI IPA warnings --- CTestCustom.cmake.in | 1 + 1 file changed, 1 insertion(+) diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 710681c..48dd3de 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -67,6 +67,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*rand.*may return deterministic values" "cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*rand.*isn.*t random" # we do not do crypto "cm(StringCommand|CTestTestHandler)\\.cxx.*warning.*srand.*seed choices are.*poor" # we do not do crypto + "IPA warning: function.*multiply defined in" # Ignore clang's summary warning, assuming prior text has matched some # other warning expression: -- cgit v0.12 From f4162856313a21fd1b7fe7b28836a741da269849 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 28 Sep 2016 16:03:14 -0400 Subject: CompileFlags: Tell PGI compiler not to issue warning diagnostics When hosting CMake's own build with the PGI compiler there are several warnings that cannot easily be fixed or suppressed. We have enough code quality tools and warnings from other compilers that it is unlikely a PGI-only warning is useful. --- CompileFlags.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CompileFlags.cmake b/CompileFlags.cmake index 382787c..c875e6f 100644 --- a/CompileFlags.cmake +++ b/CompileFlags.cmake @@ -71,6 +71,13 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro) endif() endif() +foreach(lang C CXX) + # Suppress warnings from PGI compiler. + if (CMAKE_${lang}_COMPILER_ID STREQUAL "PGI") + set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -w") + endif() +endforeach() + # use the ansi CXX compile flag for building cmake if (CMAKE_ANSI_CXXFLAGS) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}") -- cgit v0.12