Skip to content

Commit 1784467

Browse files
committed
Change compile definitions back to c++20
1 parent ce7241c commit 1784467

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ if(ystdlib_ENABLE_TESTS)
7575
set(UNIFIED_UNIT_TEST_TARGET "unit-test-all")
7676
add_executable(${UNIFIED_UNIT_TEST_TARGET})
7777
target_link_libraries(${UNIFIED_UNIT_TEST_TARGET} PRIVATE Catch2::Catch2WithMain)
78-
target_compile_features(${UNIFIED_UNIT_TEST_TARGET} PRIVATE cxx_std_17)
78+
target_compile_features(${UNIFIED_UNIT_TEST_TARGET} PRIVATE cxx_std_20)
7979
set_property(
8080
TARGET
8181
${UNIFIED_UNIT_TEST_TARGET}

cmake/ystdlib-helpers.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function(check_if_header_only SOURCE_LIST IS_HEADER_ONLY NON_HEADER_FILE)
3131
set(${NON_HEADER_FILE} "" PARENT_SCOPE)
3232
endfunction()
3333

34-
# Adds a C++17 library in the subdirectory NAME with the target NAME and alias NAMESPACE::NAME.
34+
# Adds a C++20 library in the subdirectory NAME with the target NAME and alias NAMESPACE::NAME.
3535
# Libraries with multiple levels of namespace nesting are currently not supported.
3636
#
3737
# @param {string} NAME
@@ -87,7 +87,7 @@ function(add_cpp_library)
8787
add_library(${ARG_NAME} INTERFACE)
8888
target_link_libraries(${ARG_NAME} INTERFACE ${ARG_PUBLIC_LINK_LIBRARIES})
8989

90-
target_compile_features(${ARG_NAME} INTERFACE cxx_std_17)
90+
target_compile_features(${ARG_NAME} INTERFACE cxx_std_20)
9191
else()
9292
add_library(${ARG_NAME})
9393
target_sources(${ARG_NAME} PRIVATE ${ARG_PRIVATE_SOURCES})
@@ -98,7 +98,7 @@ function(add_cpp_library)
9898
PRIVATE
9999
${ARG_PRIVATE_LINK_LIBRARIES}
100100
)
101-
target_compile_features(${ARG_NAME} PUBLIC cxx_std_17)
101+
target_compile_features(${ARG_NAME} PUBLIC cxx_std_20)
102102
endif()
103103

104104
add_library(${ALIAS_TARGET_NAME} ALIAS ${ARG_NAME})
@@ -114,7 +114,7 @@ function(add_cpp_library)
114114
)
115115
endfunction()
116116

117-
# Adds a C++ 17 test executable named `unit-test-NAME` that will be built with `SOURCES` and linked
117+
# Adds a C++20 test executable named `unit-test-NAME` that will be built with `SOURCES` and linked
118118
# with `LINK_LIBRARIES`, in addition to Catch2.
119119
#
120120
# @param {string} NAME
@@ -153,7 +153,7 @@ function(add_catch2_tests)
153153
${ARG_LINK_LIBRARIES}
154154
Catch2::Catch2WithMain
155155
)
156-
target_compile_features(${UNIT_TEST_TARGET} PRIVATE cxx_std_17)
156+
target_compile_features(${UNIT_TEST_TARGET} PRIVATE cxx_std_20)
157157
set_property(
158158
TARGET
159159
${UNIT_TEST_TARGET}

0 commit comments

Comments
 (0)