diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-16 18:26:37 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-17 13:48:28 (GMT) |
commit | bcb04783f7abd1e7781eda7499b53118fdbe8000 (patch) | |
tree | 4e1ae6f5c937d6af3c1cbe7b4da48a2e42cfaf58 /Modules/Compiler/SunPro-CXX.cmake | |
parent | 536c535cb0cf245a1785d436b0662f7fe59ef1e4 (diff) | |
download | CMake-bcb04783f7abd1e7781eda7499b53118fdbe8000.zip CMake-bcb04783f7abd1e7781eda7499b53118fdbe8000.tar.gz CMake-bcb04783f7abd1e7781eda7499b53118fdbe8000.tar.bz2 |
Features: Record for SolarisStudio 12.4.
It has similar C++11 capabilities compared to GCC 4.8.
Diffstat (limited to 'Modules/Compiler/SunPro-CXX.cmake')
-rw-r--r-- | Modules/Compiler/SunPro-CXX.cmake | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake index 5968712..cb37713 100644 --- a/Modules/Compiler/SunPro-CXX.cmake +++ b/Modules/Compiler/SunPro-CXX.cmake @@ -31,3 +31,24 @@ set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <FLAGS> -S <SOURCE> - set(CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_CXX_COMPILER> -xar -o <TARGET> <OBJECTS> " "<CMAKE_RANLIB> <TARGET> ") + +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") +endif() + +set(CMAKE_CXX_STANDARD_DEFAULT 98) + +macro(cmake_record_cxx_compile_features) + macro(_get_solaris_studio_features std_version list) + record_compiler_features(CXX "${std_version}" ${list}) + endmacro() + + set(_result 0) + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13) + _get_solaris_studio_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES) + if (_result EQUAL 0) + _get_solaris_studio_features("" CMAKE_CXX98_COMPILE_FEATURES) + endif() + endif() +endmacro() |