diff options
| author | Eric Fiselier <eric@efcs.ca> | 2016-08-14 22:51:54 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2016-08-14 22:51:54 +0000 |
| commit | 599a8425227e38ee76ab541dacb790ad439a7c5d (patch) | |
| tree | 0d198852e6c0f2cc088a04c3881bce7acf4f2122 /libcxx | |
| parent | 7e57b0027477a424236466982909904f5832dc0c (diff) | |
| download | bcm5719-llvm-599a8425227e38ee76ab541dacb790ad439a7c5d.tar.gz bcm5719-llvm-599a8425227e38ee76ab541dacb790ad439a7c5d.zip | |
Add private option to change build dialect from C++11
Although libc++ only requires C++11 to build, there are other
reasons to turn on a newer dialect in the build. For example
IDE's may not highlight any C++14/C++17 in the headers when
configured for C++11. This patch add's a private option for
changing this.
llvm-svn: 278638
Diffstat (limited to 'libcxx')
| -rw-r--r-- | libcxx/CMakeLists.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 98886b00acd..0f8859c697c 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -301,9 +301,11 @@ remove_flags(-DNDEBUG -UNDEBUG -D_DEBUG remove_flags(-Wno-pedantic -pedantic-errors -pedantic) # Required flags ============================================================== -add_compile_flags_if_supported(-std=c++11) -if (NOT MSVC AND NOT LIBCXX_SUPPORTS_STD_EQ_CXX11_FLAG) - message(FATAL_ERROR "C++11 is required but the compiler does not support -std=c++11") +set(LIBCXX_STANDARD_VER c++11 CACHE INTERNAL "internal option to change build dialect") +add_compile_flags_if_supported(-std=${LIBCXX_STANDARD_VER}) +mangle_name("LIBCXX_SUPPORTS_STD_EQ_${LIBCXX_STANDARD_VER}_FLAG" SUPPORTS_DIALECT_NAME) +if (NOT MSVC AND NOT ${SUPPORTS_DIALECT_NAME}) + message(FATAL_ERROR "C++11 or greater is required but the compiler does not support ${LIBCXX_STANDARD_VER}") endif() # On all systems the system c++ standard library headers need to be excluded. |

