summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Kopec <Matt.Kopec@intel.com>2013-03-21 20:52:53 +0000
committerMatt Kopec <Matt.Kopec@intel.com>2013-03-21 20:52:53 +0000
commit1fff9ce35e643a201e9594bf2001cfaa966e2286 (patch)
tree8f0e5d6461c04fbba2adb25734da0a9557806e22
parent1446b346291546e3d749dc71ff380b7237c967fd (diff)
downloadbcm5719-llvm-1fff9ce35e643a201e9594bf2001cfaa966e2286.tar.gz
bcm5719-llvm-1fff9ce35e643a201e9594bf2001cfaa966e2286.zip
Select correct -std flag for CMake for different versions of gcc.
llvm-svn: 177663
-rw-r--r--lldb/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
index d5a28eaa31e..aa41e9a9841 100644
--- a/lldb/CMakeLists.txt
+++ b/lldb/CMakeLists.txt
@@ -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 )
OpenPOWER on IntegriCloud