From c9cc3dc6460e32741f42d015343a65beca7482c9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 3 Apr 2024 14:26:18 -0400 Subject: PGI: Fix detection of C++ 14/17 modes The PGI compiler is based on EDG. Share conditions with Intel Classic. --- Modules/CMakeCXXCompilerId.cpp.in | 2 +- Tests/CompileFeatures/default_dialect.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 71cc182..b77e0e5 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -64,7 +64,7 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; # else # define CXX_STD __cplusplus # endif -#elif defined(__INTEL_COMPILER) +#elif defined(__INTEL_COMPILER) || defined(__PGI) # if __cplusplus == CXX_STD_11 && defined(__cpp_namespace_attributes) # define CXX_STD CXX_STD_17 # elif __cplusplus == CXX_STD_11 && defined(__cpp_aggregate_nsdmi) diff --git a/Tests/CompileFeatures/default_dialect.cpp b/Tests/CompileFeatures/default_dialect.cpp index bdd5cac..b3ac4e7 100644 --- a/Tests/CompileFeatures/default_dialect.cpp +++ b/Tests/CompileFeatures/default_dialect.cpp @@ -33,7 +33,7 @@ struct Outputter; # else # define CXX_STD __cplusplus # endif -#elif defined(__INTEL_COMPILER) +#elif defined(__INTEL_COMPILER) || defined(__PGI) # if __cplusplus == CXX_STD_11 && defined(__cpp_namespace_attributes) # define CXX_STD CXX_STD_17 # elif __cplusplus == CXX_STD_11 && defined(__cpp_aggregate_nsdmi) -- cgit v0.12