summaryrefslogtreecommitdiff
path: root/Modules/Compiler/SunPro-CXX.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-04-19 08:44:51 -0400
committerBrad King <brad.king@kitware.com>2019-04-19 09:14:00 -0400
commit66f3f11af5ecea17680077c39c6e0fe7738ca34a (patch)
tree80a11d5de5e85d34e3141e0c234a718469a6a820 /Modules/Compiler/SunPro-CXX.cmake
parentbf64e50da4a36e17ea0e27a45a5277226e123210 (diff)
downloadcmake-66f3f11af5ecea17680077c39c6e0fe7738ca34a.tar.gz
SunPro: Record support for C++14 features by SunPro 5.{14,15}
SunPro 5.15 supports `-std=c++14` and several C++14 features. SunPro 5.14 accepts `-std=c++14` but does not update its definition of `__cplusplus` or any other macro to distinguish it from `-std=c++11`, so we need to blacklist a couple features that do work but that we cannot report for that version. We can still support `cxx_std_14`. Co-Author: Robert Maynard <robert.maynard@kitware.com>
Diffstat (limited to 'Modules/Compiler/SunPro-CXX.cmake')
-rw-r--r--Modules/Compiler/SunPro-CXX.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake
index c2f6d1df12..c946c64362 100644
--- a/Modules/Compiler/SunPro-CXX.cmake
+++ b/Modules/Compiler/SunPro-CXX.cmake
@@ -52,6 +52,11 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11")
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=c++11")
set(CMAKE_CXX_LINK_WITH_STANDARD_COMPILE_OPTION 1)
+
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.14)
+ set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14")
+ set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=c++14")
+ endif()
else()
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-library=stlport4")
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-library=stlport4")