diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 2 | ||||
-rw-r--r-- | Modules/Compiler/SunPro-C.cmake | 21 | ||||
-rw-r--r-- | Modules/Compiler/SunPro-CXX-FeatureTests.cmake | 4 | ||||
-rw-r--r-- | Modules/FindJava.cmake | 3 | ||||
-rw-r--r-- | Modules/FindOpenCL.cmake | 1 |
5 files changed, 30 insertions, 1 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index ad3c00f..1d0030c 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -133,7 +133,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj # We remove items that are not language-specific. set(implicit_libs "") foreach(lib IN LISTS implicit_libs_tmp) - if("x${lib}" MATCHES "^x(crt.*\\.o|gcc.*|System.*|.*libclang_rt.*)$") + if("x${lib}" MATCHES "^x(crt.*\\.o|System.*|.*libclang_rt.*)$") string(APPEND log " remove lib [${lib}]\n") elseif(IS_ABSOLUTE "${lib}") get_filename_component(abs "${lib}" ABSOLUTE) diff --git a/Modules/Compiler/SunPro-C.cmake b/Modules/Compiler/SunPro-C.cmake index 503684a..29c2f22 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,21 @@ foreach(type SHARED_LIBRARY SHARED_MODULE EXE) set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Bdynamic") endforeach() +if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.13) + set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89") + set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=c89") + set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") + set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=c99") + set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") + set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=c11") +elseif (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.11) + set(CMAKE_C90_STANDARD_COMPILE_OPTION "") + set(CMAKE_C90_EXTENSION_COMPILE_OPTION "") + set(CMAKE_C99_STANDARD_COMPILE_OPTION "-xc99") + set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-xc99") +endif() + +__compiler_check_default_language_standard(C 5.11 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>") diff --git a/Modules/Compiler/SunPro-CXX-FeatureTests.cmake b/Modules/Compiler/SunPro-CXX-FeatureTests.cmake index 8e97e1d..60280ca 100644 --- a/Modules/Compiler/SunPro-CXX-FeatureTests.cmake +++ b/Modules/Compiler/SunPro-CXX-FeatureTests.cmake @@ -5,6 +5,10 @@ set(_cmake_oldestSupported "__SUNPRO_CC >= 0x5130") +set(SolarisStudio125_CXX11 "(__SUNPRO_CC >= 0x5140) && __cplusplus >= 201103L") +set(_cmake_feature_test_cxx_binary_literals "${SolarisStudio125_CXX11}") +set(_cmake_feature_test_cxx_reference_qualified_functions "${SolarisStudio125_CXX11}") + set(SolarisStudio124_CXX11 "(__SUNPRO_CC >= 0x5130) && __cplusplus >= 201103L") set(_cmake_feature_test_cxx_alignas "${SolarisStudio124_CXX11}") set(_cmake_feature_test_cxx_alignof "${SolarisStudio124_CXX11}") diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake index 4265a97..3d32560 100644 --- a/Modules/FindJava.cmake +++ b/Modules/FindJava.cmake @@ -143,6 +143,9 @@ if(Java_JAVA_EXECUTABLE) if(var MATCHES "java version \"([0-9]+\\.[0-9]+\\.[0-9_.]+.*)\"") # This is most likely Sun / OpenJDK, or maybe GCJ-java compat layer set(Java_VERSION_STRING "${CMAKE_MATCH_1}") + elseif(var MATCHES "openjdk version \"([0-9]+)-[a-z]+\"") + # OpenJDK 9 early access builds or locally built + set(Java_VERSION_STRING "1.${CMAKE_MATCH_1}.0") elseif(var MATCHES "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+)\"") # Kaffe style set(Java_VERSION_STRING "${CMAKE_MATCH_1}") diff --git a/Modules/FindOpenCL.cmake b/Modules/FindOpenCL.cmake index de78e7e..b8a7d82 100644 --- a/Modules/FindOpenCL.cmake +++ b/Modules/FindOpenCL.cmake @@ -118,6 +118,7 @@ if(WIN32) else() find_library(OpenCL_LIBRARY NAMES OpenCL + PATHS ENV AMDAPPSDKROOT PATH_SUFFIXES lib/x86_64 |