[libcxx-commits] [libcxx] r353649 - Make LIBCXX_STANDARD_VER configurable
Eric Fiselier via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Feb 10 10:27:55 PST 2019
Author: ericwf
Date: Sun Feb 10 10:27:55 2019
New Revision: 353649
URL: http://llvm.org/viewvc/llvm-project?rev=353649&view=rev
Log:
Make LIBCXX_STANDARD_VER configurable
Modified:
libcxx/trunk/CMakeLists.txt
libcxx/trunk/lib/CMakeLists.txt
Modified: libcxx/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=353649&r1=353648&r2=353649&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Sun Feb 10 10:27:55 2019
@@ -526,11 +526,12 @@ remove_flags("/D_DEBUG" "/MTd" "/MDd" "/
remove_flags(-Wno-pedantic -pedantic-errors -pedantic)
# Required flags ==============================================================
-set(LIBCXX_STANDARD_VER c++11 CACHE INTERNAL "internal option to change build dialect")
if (LIBCXX_HAS_MUSL_LIBC OR LIBCXX_TARGETING_CLANG_CL)
# musl's pthread implementations uses volatile types in their structs which is
# not a constexpr in C++11 but is in C++14, so we use C++14 with musl.
- set(LIBCXX_STANDARD_VER c++14 CACHE INTERNAL "internal option to change build dialect")
+ set(LIBCXX_STANDARD_VER c++14 CACHE STRING "internal option to change build dialect")
+else()
+ set(LIBCXX_STANDARD_VER c++11 CACHE STRING "internal option to change build dialect")
endif()
add_compile_flags_if_supported(-std=${LIBCXX_STANDARD_VER})
add_compile_flags_if_supported("/std:${LIBCXX_STANDARD_VER}")
Modified: libcxx/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/lib/CMakeLists.txt?rev=353649&r1=353648&r2=353649&view=diff
==============================================================================
--- libcxx/trunk/lib/CMakeLists.txt (original)
+++ libcxx/trunk/lib/CMakeLists.txt Sun Feb 10 10:27:55 2019
@@ -328,7 +328,7 @@ if (LIBCXX_ENABLE_FILESYSTEM)
set(filesystem_flags "${LIBCXX_COMPILE_FLAGS}")
check_flag_supported(-std=c++14)
- if (NOT MSVC AND LIBCXX_SUPPORTS_STD_EQ_CXX14_FLAG)
+ if (NOT MSVC AND LIBCXX_SUPPORTS_STD_EQ_CXX14_FLAG AND LIBCXX_STANDARD_VER STREQUAL "c++11")
string(REPLACE "-std=c++11" "-std=c++14" filesystem_flags "${LIBCXX_COMPILE_FLAGS}")
endif()
set_target_properties(cxx_filesystem
More information about the libcxx-commits
mailing list