summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-01 14:42:10 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-04-01 14:42:19 (GMT)
commit85f87c9d4028b9ad6bd58c2ba3b81e664af90e86 (patch)
tree4fba524c83da340d273ceed8d75bf57b0ca3957d /Modules
parentf30526c04ac41e24ce5a1c16f1482498df5c4689 (diff)
parent46d9006efa2f2f009121a09a39976ec37f052dde (diff)
downloadCMake-85f87c9d4028b9ad6bd58c2ba3b81e664af90e86.zip
CMake-85f87c9d4028b9ad6bd58c2ba3b81e664af90e86.tar.gz
CMake-85f87c9d4028b9ad6bd58c2ba3b81e664af90e86.tar.bz2
Merge topic 'xl-cxx14'
46d9006efa XL: Add comment clarifying why we pretend it has full C++11/14 support 4aaa9ea96c XL: C++14 language level flags are only available on Linux Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4551
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/XL-CXX.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/Compiler/XL-CXX.cmake b/Modules/Compiler/XL-CXX.cmake
index 3037851..41e3e11 100644
--- a/Modules/Compiler/XL-CXX.cmake
+++ b/Modules/Compiler/XL-CXX.cmake
@@ -17,8 +17,14 @@ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.1)
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-qlanglvl=extended0x")
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-qlanglvl=extended0x")
set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON)
+
+ # XL does not really have full C++11 or C++14 support, but since we do not
+ # have a granular XL-CXX-FeatureTests table for it just pretend it does.
+ # This way projects that specify granular features will at least get a
+ # compiler mode for the corresponding standard.
set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON)
- if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.1.0)
+
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.1.0 AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-qlanglvl=extended1y")
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-qlanglvl=extended1y")
set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)