summaryrefslogtreecommitdiff
path: root/Modules/Compiler/SunPro-CXX.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-09-15 19:42:26 +0200
committerBrad King <brad.king@kitware.com>2015-09-18 10:00:21 -0400
commit7235334a2f1b9a627cc1cdbc701ae0768b6e32c3 (patch)
tree36675c9df0477e6ecdb027979cfce0dbbdab2d15 /Modules/Compiler/SunPro-CXX.cmake
parentcda189356e7e0a897377c3d7ed02ea3a3ad1de5a (diff)
downloadcmake-7235334a2f1b9a627cc1cdbc701ae0768b6e32c3.tar.gz
Project: Determine default language dialect for the compiler.
Use the __cplusplus and __STDC_VERSION__ macros to automatically determine the default dialect for the compiler while determining its id and version.
Diffstat (limited to 'Modules/Compiler/SunPro-CXX.cmake')
-rw-r--r--Modules/Compiler/SunPro-CXX.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake
index e0c02d9331..ff68ee957e 100644
--- a/Modules/Compiler/SunPro-CXX.cmake
+++ b/Modules/Compiler/SunPro-CXX.cmake
@@ -36,8 +36,11 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=c++11")
endif()
-if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)
- set(CMAKE_CXX_STANDARD_DEFAULT 98)
+if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13)
+ 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})
endif()
macro(cmake_record_cxx_compile_features)