Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -331,6 +331,11 @@ message(FATAL_ERROR "C++11 or greater is required but the compiler does not support ${LIBCXX_STANDARD_VER}") endif() +check_flag_supported(-std=c++14) +if (LIBCXX_HAS_MUSL_LIBC AND LIBCXX_SUPPORTS_STD_EQ_CXX14_FLAG) + string(REPLACE "-std=c++11" "-std=c++14" LIBCXX_COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}") +endif() + # On all systems the system c++ standard library headers need to be excluded. # MSVC only has -X, which disables all default includes; including the crt. # Thus, we do nothing and hope we don't accidentally include any of the C++