Select correct -std flag for CMake for different versions of gcc.

llvm-svn: 177663
This commit is contained in:
Matt Kopec 2013-03-21 20:52:53 +00:00
parent 1446b34629
commit 1fff9ce35e
1 changed files with 10 additions and 1 deletions

View File

@ -82,7 +82,16 @@ endmacro(add_lldb_definitions)
include_directories(/usr/include/python2.7)
include_directories(../clang/include)
include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
set(CMAKE_CXX_FLAGS "-std=c++11")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7")
set(CMAKE_CXX_FLAGS "-std=c++0x")
else()
set(CMAKE_CXX_FLAGS "-std=c++11")
endif()
else()
set(CMAKE_CXX_FLAGS "-std=c++11")
endif()
# Disable MSVC warnings
if( MSVC )