summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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