forked from OSchip/llvm-project
Allow the LLD CMake build to work with -std=gnu++0x and -std=gnu++11 as
well as c++0x and c++11. This can be especially useful when building with GCC in C++11 mode. llvm-svn: 172897
This commit is contained in:
parent
058761266d
commit
8b95c03fca
|
@ -77,7 +77,9 @@ elseif (NOT MSVC)
|
|||
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=c\\+\\+11"))
|
||||
"${CMAKE_CXX_FLAGS}" MATCHES "-std=gnu\\+\\+0x" OR
|
||||
"${CMAKE_CXX_FLAGS}" MATCHES "-std=c\\+\\+11" OR
|
||||
"${CMAKE_CXX_FLAGS}" MATCHES "-std=gnu\\+\\+11"))
|
||||
message(FATAL_ERROR
|
||||
"lld requires c++11. Clang and gcc require -std=c++0x or -std=c++11 to "
|
||||
"enter this mode. Please set CMAKE_CXX_FLAGS accordingly.")
|
||||
|
|
Loading…
Reference in New Issue