summaryrefslogtreecommitdiffstats
path: root/CompileFlags.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-09-28 20:03:14 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-28 20:03:14 (GMT)
commitf4162856313a21fd1b7fe7b28836a741da269849 (patch)
tree7d762ac91327d2568fdccec7eea97fd3afc470b0 /CompileFlags.cmake
parent09a6bd820eb04570226b16ebd8cd7dcb49dac5d8 (diff)
downloadCMake-f4162856313a21fd1b7fe7b28836a741da269849.zip
CMake-f4162856313a21fd1b7fe7b28836a741da269849.tar.gz
CMake-f4162856313a21fd1b7fe7b28836a741da269849.tar.bz2
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.
Diffstat (limited to 'CompileFlags.cmake')
-rw-r--r--CompileFlags.cmake7
1 files changed, 7 insertions, 0 deletions
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}")