diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-04-15 16:38:03 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2019-04-15 16:38:03 (GMT) |
commit | 458ea9d76c42b982b48104e700d844a50dc4978c (patch) | |
tree | 82c231103a5be2bd50aba85049347ba8deaff6a0 | |
parent | d38d7747fe91db4753e9aa26e9b7dd8d065e1cdc (diff) | |
download | CMake-458ea9d76c42b982b48104e700d844a50dc4978c.zip CMake-458ea9d76c42b982b48104e700d844a50dc4978c.tar.gz CMake-458ea9d76c42b982b48104e700d844a50dc4978c.tar.bz2 |
XL: Add C++14 language level flags
-rw-r--r-- | Help/release/dev/xl-supports-cxx14.rst | 4 | ||||
-rw-r--r-- | Modules/Compiler/XL-CXX.cmake | 5 | ||||
-rw-r--r-- | Modules/Compiler/XLClang-CXX.cmake | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/Help/release/dev/xl-supports-cxx14.rst b/Help/release/dev/xl-supports-cxx14.rst new file mode 100644 index 0000000..a18e0ad --- /dev/null +++ b/Help/release/dev/xl-supports-cxx14.rst @@ -0,0 +1,4 @@ +xlc-supports-cxx14 +---------------------- + +* IBM AIX XL compiler have learned how to compile C++14. diff --git a/Modules/Compiler/XL-CXX.cmake b/Modules/Compiler/XL-CXX.cmake index ec3f1f8..3037851 100644 --- a/Modules/Compiler/XL-CXX.cmake +++ b/Modules/Compiler/XL-CXX.cmake @@ -18,6 +18,11 @@ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.1) set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-qlanglvl=extended0x") set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON) set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON) + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.1.0) + set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-qlanglvl=extended1y") + set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-qlanglvl=extended1y") + set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON) + endif() endif () __compiler_check_default_language_standard(CXX 10.1 98) diff --git a/Modules/Compiler/XLClang-CXX.cmake b/Modules/Compiler/XLClang-CXX.cmake index 03c7c7b..9ea3d7c 100644 --- a/Modules/Compiler/XLClang-CXX.cmake +++ b/Modules/Compiler/XLClang-CXX.cmake @@ -15,6 +15,10 @@ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.1) set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y") set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON) endif () + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.1.0) + set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14") + set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14") + endif() endif() __compiler_check_default_language_standard(CXX 13.1.1 98) |