This enforces libcxx and its benchmarks are compiled by a C++20 capable
compiler. Based on review comments in D103413.
Differential Revision: https://reviews.llvm.org/D110338
# in the dylib. C++20 is needed to use char8_t.
set_target_properties(${target} PROPERTIES
CXX_STANDARD 20
- CXX_STANDARD_REQUIRED NO
+ CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS NO)
# When building the dylib, don't warn for unavailable aligned allocation
set(BENCHMARK_NATIVE_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-native)
add_library( cxx-benchmarks-flags INTERFACE)
-target_compile_features( cxx-benchmarks-flags INTERFACE cxx_std_17)
+target_compile_features( cxx-benchmarks-flags INTERFACE cxx_std_20)
target_compile_options( cxx-benchmarks-flags INTERFACE -O2 -fsized-deallocation)
target_include_directories(cxx-benchmarks-flags INTERFACE "${BENCHMARK_LIBCXX_INSTALL}/include"
INTERFACE "${LIBCXX_SOURCE_DIR}/test/support")