aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-07-20 14:47:09 -0700
committerEric Anholt <eric@anholt.net>2012-08-09 09:18:51 -0700
commit913b0b817bdb6ad6b6b30bbf6e343fee62c7d33d (patch)
tree0d90db940241db51e4184a3d3d05f2a0c56a1a89 /CMakeLists.txt
parent048a8ea33d365c279035ba9b0a518312bba06707 (diff)
downloadpiglit-913b0b817bdb6ad6b6b30bbf6e343fee62c7d33d.tar.gz
Shut up gcc about c++11 issues.
This isn't c++11 code.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index effa8d88..b2de6a9f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,6 +118,11 @@ if (NOT MSVC)
IF (C_COMPILER_FLAG_WDECL_AFTER_STMT)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wdeclaration-after-statement")
ENDIF (C_COMPILER_FLAG_WDECL_AFTER_STMT)
+
+ CHECK_CXX_COMPILER_FLAG("-Wno-narrowing" CXX_COMPILER_FLAG_WNO_NARROWING)
+ IF (CXX_COMPILER_FLAG_WNO_NARROWING)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing")
+ ENDIF (CXX_COMPILER_FLAG_WNO_NARROWING)
else ()
include_directories("include/msvc/c99")