Commit 800b2aad authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'sunpro-cxx14-features'

66f3f11a SunPro: Record support for C++14 features by SunPro 5.{14,15}
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3248
parents d0e37018 66f3f11a
Pipeline #135338 passed with stage
in 0 seconds
......@@ -6,6 +6,14 @@
set(_cmake_oldestSupported "__SUNPRO_CC >= 0x5130")
set(SolarisStudio126_CXX14 "(__SUNPRO_CC >= 0x5150) && __cplusplus >= 201402L")
set(_cmake_feature_test_cxx_aggregate_default_initializers "${SolarisStudio126_CXX14}")
set(_cmake_feature_test_cxx_digit_separators "${SolarisStudio126_CXX14}")
set(_cmake_feature_test_cxx_generic_lambdas "${SolarisStudio126_CXX14}")
set(_cmake_feature_test_cxx_lambda_init_captures "${SolarisStudio126_CXX14}")
set(_cmake_feature_test_cxx_return_type_deduction "${SolarisStudio126_CXX14}")
set(_cmake_feature_test_cxx_variable_templates "${SolarisStudio126_CXX14}")
set(SolarisStudio126_CXX11 "(__SUNPRO_CC >= 0x5150) && __cplusplus >= 201103L")
set(_cmake_feature_test_cxx_decltype_auto "${SolarisStudio126_CXX11}")
......
......@@ -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")
......
......@@ -52,6 +52,16 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.15)
# SunPro 5.14 accepts -std=c++14 and compiles two features but does
# not define __cplusplus to a value different than with -std=c++11.
list(REMOVE_ITEM CXX_non_features
cxx_aggregate_default_initializers
cxx_digit_separators
)
endif()
# FIXME: Do any of these work correctly on SunPro 5.13 or above?
list(REMOVE_ITEM CXX_non_features
cxx_attribute_deprecated
cxx_contextual_conversions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment