summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/SunPro-C.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-03 17:07:09 (GMT)
committerBrad King <brad.king@kitware.com>2017-05-03 17:13:43 (GMT)
commitf15f905babad5977aa422e1753fe1aa658c77fa2 (patch)
tree0fdf9942336ae16648f6e862f1a2dea01dccbf1f /Modules/Compiler/SunPro-C.cmake
parent84d0841ed7d06779b68a3950054b636f6ef4af74 (diff)
downloadCMake-f15f905babad5977aa422e1753fe1aa658c77fa2.zip
CMake-f15f905babad5977aa422e1753fe1aa658c77fa2.tar.gz
CMake-f15f905babad5977aa422e1753fe1aa658c77fa2.tar.bz2
Features: Record standards and features for SunPro 5.14
Oracle Studio 12.5 adds support for C 11 and associated standard flags. It also adds a few more C++ 11 features.
Diffstat (limited to 'Modules/Compiler/SunPro-C.cmake')
-rw-r--r--Modules/Compiler/SunPro-C.cmake14
1 files changed, 14 insertions, 0 deletions
diff --git a/Modules/Compiler/SunPro-C.cmake b/Modules/Compiler/SunPro-C.cmake
index 503684a..263bbe4 100644
--- a/Modules/Compiler/SunPro-C.cmake
+++ b/Modules/Compiler/SunPro-C.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_C_VERBOSE_FLAG "-#")
set(CMAKE_C_COMPILE_OPTIONS_PIC -KPIC)
@@ -22,5 +27,14 @@ foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Bdynamic")
endforeach()
+if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.14)
+ set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
+ set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=c90")
+ set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
+ set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=c11")
+endif()
+
+__compiler_check_default_language_standard(C 5.13 90 5.14 11)
+
set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")