forked from OSchip/llvm-project
cmake no longer needs to deal with -std=c++11 checks.
LLVM requires and handles this now and has the correct compiler version checks. This block of code for cmake in LLDB is no longer needed. Summary: cmake no longer needs to deal with -std=c++11 checks. Reviewers: labath Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10994 llvm-svn: 241590
This commit is contained in:
parent
137d7ba8b2
commit
1f44139a4f
|
@ -88,32 +88,6 @@ endif()
|
||||||
include_directories(../clang/include)
|
include_directories(../clang/include)
|
||||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
|
include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
|
||||||
|
|
||||||
# lldb requires c++11 to build. Make sure that we have a compiler and standard
|
|
||||||
# library combination that can do that.
|
|
||||||
if (NOT MSVC)
|
|
||||||
# gcc and clang require the -std=c++0x or -std=c++11 flag.
|
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR
|
|
||||||
"${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
|
||||||
if (NOT ("${CMAKE_CXX_FLAGS}" MATCHES "-std=c\\+\\+0x" OR
|
|
||||||
"${CMAKE_CXX_FLAGS}" MATCHES "-std=gnu\\+\\+0x" OR
|
|
||||||
"${CMAKE_CXX_FLAGS}" MATCHES "-std=c\\+\\+11" OR
|
|
||||||
"${CMAKE_CXX_FLAGS}" MATCHES "-std=gnu\\+\\+11"))
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
||||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
|
||||||
else()
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
elseif (MSVC_VERSION LESS 1700)
|
|
||||||
message(FATAL_ERROR "The selected compiler does not support c++11 which is "
|
|
||||||
"required to build lldb.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Disable GCC warnings
|
# Disable GCC warnings
|
||||||
check_cxx_compiler_flag("-Wno-deprecated-declarations"
|
check_cxx_compiler_flag("-Wno-deprecated-declarations"
|
||||||
CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS)
|
CXX_SUPPORTS_NO_DEPRECATED_DECLARATIONS)
|
||||||
|
|
Loading…
Reference in New Issue