From 8b95c03fca296547e440523334a8a294622f15fe Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sat, 19 Jan 2013 09:41:42 +0000 Subject: [PATCH] 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 --- lld/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt index 8fd25a99ad21..83043fdec92f 100644 --- a/lld/CMakeLists.txt +++ b/lld/CMakeLists.txt @@ -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.")