diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 710681cce..48dd3debc 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: diff --git a/CompileFlags.cmake b/CompileFlags.cmake index 382787cfb..c875e6f1f 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}")