From 458ea9d76c42b982b48104e700d844a50dc4978c Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 15 Apr 2019 12:38:03 -0400 Subject: XL: Add C++14 language level flags --- Help/release/dev/xl-supports-cxx14.rst | 4 ++++ Modules/Compiler/XL-CXX.cmake | 5 +++++ Modules/Compiler/XLClang-CXX.cmake | 4 ++++ 3 files changed, 13 insertions(+) create mode 100644 Help/release/dev/xl-supports-cxx14.rst 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) -- cgit v0.12