mirror of
https://github.com/Kitware/CMake.git
synced 2026-06-30 19:57:41 +00:00
NVHPC: Add detection of C++ 26 mode
This compiler uses GCC's standard library, and so limits `__cplusplus` to that of the GCC toolchain. However, it defines feature macros that we can use to distinguish this mode.
This commit is contained in:
@@ -63,7 +63,9 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
# define CXX_STD __cplusplus
|
||||
# endif
|
||||
#elif defined(__NVCOMPILER)
|
||||
# if __cplusplus == CXX_STD_17 && defined(__cpp_aggregate_paren_init)
|
||||
# if __cplusplus > CXX_STD_20 && defined(__cpp_pp_embed)
|
||||
# define CXX_STD /*CXX_STD_26*/ (CXX_STD_23 + 1)
|
||||
# elif __cplusplus == CXX_STD_17 && defined(__cpp_aggregate_paren_init)
|
||||
# define CXX_STD CXX_STD_20
|
||||
# else
|
||||
# define CXX_STD __cplusplus
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
# define CXX_STD __cplusplus
|
||||
# endif
|
||||
#elif defined(__NVCOMPILER)
|
||||
# if __cplusplus == CXX_STD_17 && defined(__cpp_aggregate_paren_init)
|
||||
# if __cplusplus > CXX_STD_20 && defined(__cpp_pp_embed)
|
||||
# define CXX_STD /*CXX_STD_26*/ (CXX_STD_23 + 1)
|
||||
# elif __cplusplus == CXX_STD_17 && defined(__cpp_aggregate_paren_init)
|
||||
# define CXX_STD CXX_STD_20
|
||||
# else
|
||||
# define CXX_STD __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user