summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2024-04-15 18:51:20 (GMT)
committerBrad King <brad.king@kitware.com>2024-04-16 19:34:57 (GMT)
commit1ba4a0633833903a3429e87a4c72ffe738139dd4 (patch)
tree048b823523dae406221d98a47a4d9255ad16adef /Modules/Compiler
parent2038f2c2b14b733a697d332fdaf357a1ea3167bb (diff)
downloadCMake-1ba4a0633833903a3429e87a4c72ffe738139dd4.zip
CMake-1ba4a0633833903a3429e87a4c72ffe738139dd4.tar.gz
CMake-1ba4a0633833903a3429e87a4c72ffe738139dd4.tar.bz2
GNU: Add flags for C++26 modes
Flags added in GCC commit `5388a43f6a3` (c++: Add support for -std={c,gnu}++2{c,6}, 2023-06-22).
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/GNU.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index fa199b4..1113e9a 100644
--- a/Modules/Compiler/GNU.cmake
+++ b/Modules/Compiler/GNU.cmake
@@ -293,4 +293,9 @@ macro(__compiler_gnu_cxx_standards lang)
set(CMAKE_${lang}20_STANDARD_COMPILE_OPTION "-std=c++2a")
set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "-std=gnu++2a")
endif()
+
+ if(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 14.0)
+ set(CMAKE_${lang}26_STANDARD_COMPILE_OPTION "-std=c++26")
+ set(CMAKE_${lang}26_EXTENSION_COMPILE_OPTION "-std=gnu++26")
+ endif()
endmacro()