[Lldb-commits] [lldb] r177663 - Select correct -std flag for CMake for different versions of gcc.

Matt Kopec Matt.Kopec at intel.com
Thu Mar 21 13:52:53 PDT 2013


Author: mkopec
Date: Thu Mar 21 15:52:53 2013
New Revision: 177663

URL: http://llvm.org/viewvc/llvm-project?rev=177663&view=rev
Log:
Select correct -std flag for CMake for different versions of gcc.

Modified:
    lldb/trunk/CMakeLists.txt

Modified: lldb/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=177663&r1=177662&r2=177663&view=diff
==============================================================================
--- lldb/trunk/CMakeLists.txt (original)
+++ lldb/trunk/CMakeLists.txt Thu Mar 21 15:52:53 2013
@@ -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 )





More information about the lldb-commits mailing list