Skip to content
Permalink
Browse files

Add C++11 -Wno-deprecated-register only to clang versions with support

  • Loading branch information
dakcarto committed Feb 18, 2015
1 parent 39d3765 commit 9a75c9e113b629725285618d20dd9ba4c90ed0b7
Showing with 5 additions and 1 deletion.
  1. +5 −1 CMakeLists.txt
@@ -330,8 +330,12 @@ ELSEIF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
IF ((NOT APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "3.2")
OR (APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.1"))
SET(USE_CXX_11 TRUE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-error=c++11-narrowing")
#deprecated-register breaks Travis builds
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-error=c++11-narrowing -Wno-deprecated-register")
IF ((NOT APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "3.3")
OR (APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "5.0"))
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register")
ENDIF()
ENDIF()
ELSE()
SET(USE_CXX_11 FALSE)

0 comments on commit 9a75c9e

Please sign in to comment.
You can’t perform that action at this time.