[Piglit] [PATCH] Shut up gcc about c++11 issues.
Eric Anholt
eric at anholt.net
Thu Jul 26 16:21:53 PDT 2012
This isn't c++11 code.
---
CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index effa8d8..b2de6a9 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")
--
1.7.10.4
More information about the Piglit
mailing list