diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2021-08-05 13:11:40 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2021-08-05 20:19:12 (GMT) |
commit | f5dbc27c27a09a3d62d619e9859b3b8c3cb7699a (patch) | |
tree | 58c23e2084d5f0a71e3bd541b841de672fdc92e1 | |
parent | fbf5a368c9d3a8d3b1caaf77c290524fc41d42ee (diff) | |
download | CMake-f5dbc27c27a09a3d62d619e9859b3b8c3cb7699a.zip CMake-f5dbc27c27a09a3d62d619e9859b3b8c3cb7699a.tar.gz CMake-f5dbc27c27a09a3d62d619e9859b3b8c3cb7699a.tar.bz2 |
NVHPC-CXX: Add support for C++20
-rw-r--r-- | Modules/Compiler/NVHPC-CXX.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Compiler/NVHPC-CXX.cmake b/Modules/Compiler/NVHPC-CXX.cmake index ac75b53..534e822 100644 --- a/Modules/Compiler/NVHPC-CXX.cmake +++ b/Modules/Compiler/NVHPC-CXX.cmake @@ -4,4 +4,9 @@ include(Compiler/NVHPC) # Needed so that we support `LANGUAGE` property correctly set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++) +if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 20.11) + set(CMAKE_CXX20_STANDARD_COMPILE_OPTION -std=c++20) + set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION -std=gnu++20) +endif() + __compiler_nvhpc(CXX) |