Not setting c++98compat warning for xcode

This commit is contained in:
Strahinja Val Markovic 2012-08-11 19:00:39 -07:00
parent ee3ea72e3c
commit 04c04c6bce
2 changed files with 5 additions and 1 deletions

View File

@ -36,6 +36,10 @@ if ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" )
endif()
if ( CMAKE_GENERATOR STREQUAL Xcode )
set( CMAKE_GENERATOR_IS_XCODE true )
endif()
# Force release build by default, speed is of the essence
if ( NOT CMAKE_BUILD_TYPE )
set( CMAKE_BUILD_TYPE Release )

View File

@ -120,7 +120,7 @@ endif()
#############################################################################
# We want warnings if we accidentally use C++11 features
if ( COMPILER_IS_CLANG )
if ( COMPILER_IS_CLANG AND NOT CMAKE_GENERATOR_IS_XCODE )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wc++98-compat" )
endif()