summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-31 14:33:01 (GMT)
committerBrad King <brad.king@kitware.com>2020-03-31 14:35:56 (GMT)
commit46d9006efa2f2f009121a09a39976ec37f052dde (patch)
tree74984526e28befa448476b3581f7b005dc533103 /Modules/Compiler
parent4aaa9ea96c1e00237fa5d1ffd9e2938bc0d711e8 (diff)
downloadCMake-46d9006efa2f2f009121a09a39976ec37f052dde.zip
CMake-46d9006efa2f2f009121a09a39976ec37f052dde.tar.gz
CMake-46d9006efa2f2f009121a09a39976ec37f052dde.tar.bz2
XL: Add comment clarifying why we pretend it has full C++11/14 support
Since commit b0f46c48f6 (CompileFeatures: Now able to presume full language level support, 2019-03-06, v3.15.0-rc1~265^2~1) we pretend that the XL compiler has full C++11 and C++14 support so that projects specifying granular features will at least get the corresponding compiler mode. This is a work around for our lack of a full feature check table for this compiler that works in common cases. Add a comment explaining this. Issue: #20521
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/XL-CXX.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/Compiler/XL-CXX.cmake b/Modules/Compiler/XL-CXX.cmake
index 7641078..41e3e11 100644
--- a/Modules/Compiler/XL-CXX.cmake
+++ b/Modules/Compiler/XL-CXX.cmake
@@ -17,7 +17,13 @@ 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 AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-qlanglvl=extended1y")
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-qlanglvl=extended1y")