[libcxx-commits] [libcxx] [libc++] Build the library with C++26 (PR #181021)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Feb 23 22:59:54 PST 2026
================
@@ -504,11 +504,9 @@ remove_flags(-Wno-pedantic -pedantic-errors -pedantic)
# Required flags ==============================================================
function(cxx_add_basic_build_flags target)
- # Use C++23 for all targets.
- set_target_properties(${target} PROPERTIES
- CXX_STANDARD 23
- CXX_STANDARD_REQUIRED OFF # TODO: Make this REQUIRED once we don't need to accommodate the LLVM documentation builders using an ancient CMake
- CXX_EXTENSIONS NO)
+ # Use C++26 for all targets. Note that we don't use CXX_STANDARD or cxx_std_foo
+ # since that requires a newer CMake than is available.
+ target_compile_options(${target} PRIVATE $<IF:$<CXX_COMPILER_ID:MSVC>,/std:c++26,-std=c++26>)
----------------
H-G-Hristov wrote:
Is this for clang-cl support? Anyway historically requesting the latest version in MSVC was done with "/std:c++latest", `/std:c++23preview` must be a relatively new addition.
https://github.com/llvm/llvm-project/pull/181021
More information about the libcxx-commits
mailing list