Merge topic 'suppress-pgi-warnings'

f4162856 CompileFlags: Tell PGI compiler not to issue warning diagnostics
09a6bd82 CTestCustom: Suppress PGI IPA warnings
This commit is contained in:
Brad King 2016-09-29 08:09:33 -04:00 committed by CMake Topic Stage
commit 4f719f2304
2 changed files with 8 additions and 0 deletions

View File

@ -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:

View File

@ -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}")