diff options
author | Brad King <brad.king@kitware.com> | 2024-04-03 18:26:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-04-04 21:56:31 (GMT) |
commit | 3587579f34235255db11a2d2b11668829f256790 (patch) | |
tree | 573b9af9be3a9d2863b3cd6506e26d0b5a429658 /Modules/CMakeCXXCompilerId.cpp.in | |
parent | 863cde8c19d63177da2212f06a0b7d93279e04c9 (diff) | |
download | CMake-3587579f34235255db11a2d2b11668829f256790.zip CMake-3587579f34235255db11a2d2b11668829f256790.tar.gz CMake-3587579f34235255db11a2d2b11668829f256790.tar.bz2 |
XL/XLClang: Fix detection of C++ 14 mode on Linux
This compiler does not always define `__cplusplus` correctly, but does
define a feature macro that we can use to distinguish this mode.
Diffstat (limited to 'Modules/CMakeCXXCompilerId.cpp.in')
-rw-r--r-- | Modules/CMakeCXXCompilerId.cpp.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 3a334ed..2a92287 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -66,6 +66,12 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; # else # define CXX_STD __cplusplus # endif +#elif (defined(__IBMCPP__) || defined(__ibmxl__)) && defined(__linux__) +# if __cplusplus == CXX_STD_11 && defined(__cpp_aggregate_nsdmi) +# define CXX_STD CXX_STD_14 +# else +# define CXX_STD __cplusplus +# endif #else # define CXX_STD __cplusplus #endif |