diff options
author | Brad King <brad.king@kitware.com> | 2016-09-29 12:09:33 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-09-29 12:09:33 (GMT) |
commit | 4f719f23041cef87003b03e5fe722da06091f07f (patch) | |
tree | 8370b73f192eb66113159fcbbf5497dbf9184b0b | |
parent | 11c5871c1cb53f72a547db16d2e75702b312b18c (diff) | |
parent | f4162856313a21fd1b7fe7b28836a741da269849 (diff) | |
download | CMake-4f719f23041cef87003b03e5fe722da06091f07f.zip CMake-4f719f23041cef87003b03e5fe722da06091f07f.tar.gz CMake-4f719f23041cef87003b03e5fe722da06091f07f.tar.bz2 |
Merge topic 'suppress-pgi-warnings'
f4162856 CompileFlags: Tell PGI compiler not to issue warning diagnostics
09a6bd82 CTestCustom: Suppress PGI IPA warnings
-rw-r--r-- | CTestCustom.cmake.in | 1 | ||||
-rw-r--r-- | CompileFlags.cmake | 7 |
2 files changed, 8 insertions, 0 deletions
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: 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}") |