From 2b3cf4c1f75220583c02aae466f4c9daa3415937 Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Tue, 28 Apr 2026 10:29:49 +1200 Subject: [PATCH] Updated C++ standard to version 20. --- src/CMakeLists.txt | 4 ++-- src/bindings/javascript/CMakeLists.txt | 2 +- tests/api_headers/api_header_test.in.cmake | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 466fb29304..59caf0233b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -204,7 +204,7 @@ endif() apply_libxml2_settings(cellml) # Use target compile features to propagate features to consuming projects. -target_compile_features(cellml PUBLIC cxx_std_17) +target_compile_features(cellml PUBLIC cxx_std_20) set_target_properties(cellml PROPERTIES CXX_VISIBILITY_PRESET hidden @@ -229,7 +229,7 @@ set(DEBUG_HEADER_FILES add_library(cellml_debug_utilities STATIC ${DEBUG_SOURCE_FILES} ${DEBUG_HEADER_FILES}) -target_compile_features(cellml_debug_utilities PUBLIC cxx_std_17) +target_compile_features(cellml_debug_utilities PUBLIC cxx_std_20) target_include_directories(cellml_debug_utilities PUBLIC diff --git a/src/bindings/javascript/CMakeLists.txt b/src/bindings/javascript/CMakeLists.txt index db8a68e01c..046f6be52d 100644 --- a/src/bindings/javascript/CMakeLists.txt +++ b/src/bindings/javascript/CMakeLists.txt @@ -40,7 +40,7 @@ target_link_libraries(javascript-bindings PUBLIC cellml) # I want to add '-fwasm-exceptions' to the COMPILE_FLAGS but Node doesn't support # this yet. This is a reminder to enable it when Node does support exceptions. set_target_properties(javascript-bindings PROPERTIES - CXX_STANDARD 11 + CXX_STANDARD 20 CXX_STANDARD_REQUIRED ON CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN 0 diff --git a/tests/api_headers/api_header_test.in.cmake b/tests/api_headers/api_header_test.in.cmake index 14cc0b88c5..bc94cb6417 100644 --- a/tests/api_headers/api_header_test.in.cmake +++ b/tests/api_headers/api_header_test.in.cmake @@ -3,7 +3,7 @@ add_executable(${CURRENT_TEST} ${TEST_SRC}) target_link_libraries(${CURRENT_TEST} cellml gtest_main) set_target_properties(${CURRENT_TEST} PROPERTIES - CXX_STANDARD 11 + CXX_STANDARD 20 CXX_STANDARD_REQUIRED ON FOLDER tests)