diff options
author | scivision <scivision@users.noreply.github.com> | 2024-09-27 17:52:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-10-02 14:34:35 (GMT) |
commit | 247497eacfd03f0faf13ad69c5d006248ad3d24a (patch) | |
tree | 61803f12f24e4b89219711509c079721b9582879 | |
parent | 823e0a3a6187f02c06b86c32d6966eff25b9abc8 (diff) | |
download | CMake-247497eacfd03f0faf13ad69c5d006248ad3d24a.zip CMake-247497eacfd03f0faf13ad69c5d006248ad3d24a.tar.gz CMake-247497eacfd03f0faf13ad69c5d006248ad3d24a.tar.bz2 |
NVHPC: Record C++23 support
NVHPC 24.9 documents support for `-std=c++23` [1].
[1] https://docs.nvidia.com/hpc-sdk/archive/24.9/hpc-sdk-release-notes/index.html
-rw-r--r-- | Modules/Compiler/NVHPC-CXX.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/Compiler/NVHPC-CXX.cmake b/Modules/Compiler/NVHPC-CXX.cmake index 0d804f4..e849cbd 100644 --- a/Modules/Compiler/NVHPC-CXX.cmake +++ b/Modules/Compiler/NVHPC-CXX.cmake @@ -20,4 +20,11 @@ else() # can't occur in the same invocation set(CMAKE_CXX_DEPENDS_EXTRA_COMMANDS "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -x c++ -M <SOURCE> -MT <OBJECT> -MD<DEP_FILE>") endif() + +if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 24.9) + set(CMAKE_CXX23_STANDARD_COMPILE_OPTION -std=c++23) + set(CMAKE_CXX23_EXTENSION_COMPILE_OPTION -std=c++23) # -std=gnu++23 is missing + set(CMAKE_CXX_STANDARD_LATEST 23) +endif() + __compiler_nvhpc(CXX) |