diff options
author | Chuck Atkins <chuck.atkins@kitware.com> | 2017-05-01 17:11:26 (GMT) |
---|---|---|
committer | Chuck Atkins <chuck.atkins@kitware.com> | 2017-05-02 13:49:23 (GMT) |
commit | 174c02e149ab4bcc9bc98d4e4042eb0b24e2f2ee (patch) | |
tree | 384655fec13fa7f089f582c360c846ca670c6f40 | |
parent | 08fa2ba8d0682e0c9c307b572afbcee05cc93477 (diff) | |
download | CMake-174c02e149ab4bcc9bc98d4e4042eb0b24e2f2ee.zip CMake-174c02e149ab4bcc9bc98d4e4042eb0b24e2f2ee.tar.gz CMake-174c02e149ab4bcc9bc98d4e4042eb0b24e2f2ee.tar.bz2 |
SunPro: Use common compiler macros for language standard default
-rw-r--r-- | Modules/Compiler/SunPro-CXX.cmake | 17 | ||||
-rw-r--r-- | Modules/Compiler/SunPro.cmake | 10 |
2 files changed, 16 insertions, 11 deletions
diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake index b4183db..5db7987 100644 --- a/Modules/Compiler/SunPro-CXX.cmake +++ b/Modules/Compiler/SunPro-CXX.cmake @@ -1,3 +1,8 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +include(Compiler/SunPro) + set(CMAKE_CXX_VERBOSE_FLAG "-v") set(CMAKE_CXX_COMPILE_OPTIONS_PIC -KPIC) @@ -39,17 +44,7 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13) set(CMAKE_CXX_LINK_WITH_STANDARD_COMPILE_OPTION 1) endif() -if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13) - if (NOT CMAKE_CXX_COMPILER_FORCED) - if (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT) - message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}") - endif() - set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}) - elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT) - # Compiler id was forced so just guess the default standard level. - set(CMAKE_CXX_STANDARD_DEFAULT 98) - endif() -endif() +__compiler_check_default_language_standard(CXX 5.13 98) macro(cmake_record_cxx_compile_features) set(_result 0) diff --git a/Modules/Compiler/SunPro.cmake b/Modules/Compiler/SunPro.cmake new file mode 100644 index 0000000..52da39a --- /dev/null +++ b/Modules/Compiler/SunPro.cmake @@ -0,0 +1,10 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +# This module is shared by multiple languages; use include blocker. +if(__COMPILER_SUNPRO) + return() +endif() +set(__COMPILER_SUNPRO 1) + +include(Compiler/CMakeCommonCompilerMacros) |