diff options
author | Brad King <brad.king@kitware.com> | 2017-05-08 10:26:54 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-05-08 10:53:46 -0400 |
commit | 2731a91c98ad8b48aaecc2fa3039cc9601d48fbc (patch) | |
tree | 8380a837b0e22ccef3e360567a133c33da08b311 /CMakeLists.txt | |
parent | 86edc5b6a5f9ef74d8807a6b90d209cce4e3a2d7 (diff) | |
download | cmake-2731a91c98ad8b48aaecc2fa3039cc9601d48fbc.tar.gz |
Update SunPro flags used for CMake itself to support C++11
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b88538bc2..eb46c3b286 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,11 +55,15 @@ if(NOT DEFINED CMAKE_C_STANDARD AND NOT CMake_NO_C_STANDARD) endif() endif() if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD) - include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_cstdio.cmake) - if(NOT CMake_CXX14_CSTDIO_BROKEN) - set(CMAKE_CXX_STANDARD 14) + if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.14) + set(CMAKE_CXX_STANDARD 98) else() - set(CMAKE_CXX_STANDARD 11) + include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx14_cstdio.cmake) + if(NOT CMake_CXX14_CSTDIO_BROKEN) + set(CMAKE_CXX_STANDARD 14) + else() + set(CMAKE_CXX_STANDARD 11) + endif() endif() endif() if(NOT CMake_TEST_EXTERNAL_CMAKE) |