diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/IAR-CXX.cmake | 9 | ||||
-rw-r--r-- | Modules/FindHDF5.cmake | 46 | ||||
-rw-r--r-- | Modules/FindRuby.cmake | 35 | ||||
-rw-r--r-- | Modules/Internal/CPack/NSIS.template.in | 3 |
4 files changed, 77 insertions, 16 deletions
diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake index a3f1dbc..7df74ad 100644 --- a/Modules/Compiler/IAR-CXX.cmake +++ b/Modules/Compiler/IAR-CXX.cmake @@ -16,14 +16,17 @@ endif() # Whenever needed, override this default behavior using CMAKE_IAR_CXX_FLAG in your toolchain file. if(NOT CMAKE_IAR_CXX_FLAG) - set(_CMAKE_IAR_MODERNCXX_LIST 14 17) - if(${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT} IN_LIST _CMAKE_IAR_MODERNCXX_LIST OR + cmake_policy(PUSH) + cmake_policy(SET CMP0057 NEW) # if IN_LIST + + if(${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT} IN_LIST "14;17" OR ("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM" AND ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT} EQUAL 98)) string(PREPEND CMAKE_CXX_FLAGS "--c++ ") else() string(PREPEND CMAKE_CXX_FLAGS "--eec++ ") endif() - unset(_CMAKE_IAR_MODERNCXX_LIST) + + cmake_policy(POP) endif() set(CMAKE_CXX_STANDARD_COMPILE_OPTION "") diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 6e07da5..9123d56 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -1050,8 +1050,12 @@ if (HDF5_FOUND) else() if (DEFINED "HDF5_${hdf5_target_name}_LIBRARY") set(_hdf5_location "${HDF5_${hdf5_target_name}_LIBRARY}") + set(_hdf5_location_release "${HDF5_${hdf5_target_name}_LIBRARY_RELEASE}") + set(_hdf5_location_debug "${HDF5_${hdf5_target_name}_LIBRARY_DEBUG}") elseif (DEFINED "HDF5_${hdf5_lang}_LIBRARY") set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY}") + set(_hdf5_location_release "${HDF5_${hdf5_lang}_LIBRARY_RELEASE}") + set(_hdf5_location_debug "${HDF5_${hdf5_lang}_LIBRARY_DEBUG}") elseif (DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}") set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}}") else () @@ -1066,10 +1070,24 @@ if (HDF5_FOUND) set(HDF5_${hdf5_lang}_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}) endif () set_target_properties("hdf5::${hdf5_target_name}" PROPERTIES - IMPORTED_LOCATION "${_hdf5_location}" - IMPORTED_IMPLIB "${_hdf5_location}" INTERFACE_INCLUDE_DIRECTORIES "${HDF5_${hdf5_lang}_INCLUDE_DIRS}" INTERFACE_COMPILE_DEFINITIONS "${_hdf5_definitions}") + if (_hdf5_location_release) + set_property(TARGET "hdf5::${hdf5_target_name}" APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_property(TARGET "hdf5::${hdf5_target_name}" PROPERTY + IMPORTED_LOCATION_RELEASE "${_hdf5_location_release}") + endif() + if (_hdf5_location_debug) + set_property(TARGET "hdf5::${hdf5_target_name}" APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_property(TARGET "hdf5::${hdf5_target_name}" PROPERTY + IMPORTED_LOCATION_DEBUG "${_hdf5_location_debug}") + endif() + if (NOT _hdf5_location_release AND NOT _hdf5_location_debug) + set_property(TARGET "hdf5::${hdf5_target_name}" PROPERTY + IMPORTED_LOCATION "${_hdf5_location}") + endif() if (_hdf5_libtype STREQUAL "SHARED") set_property(TARGET "hdf5::${hdf5_target_name}" APPEND PROPERTY @@ -1082,6 +1100,8 @@ if (HDF5_FOUND) unset(_hdf5_definitions) unset(_hdf5_libtype) unset(_hdf5_location) + unset(_hdf5_location_release) + unset(_hdf5_location_debug) endif () endif () @@ -1111,8 +1131,12 @@ if (HDF5_FOUND) else() if (DEFINED "HDF5_${hdf5_target_name}_LIBRARY") set(_hdf5_location "${HDF5_${hdf5_target_name}_LIBRARY}") + set(_hdf5_location_release "${HDF5_${hdf5_target_name}_LIBRARY_RELEASE}") + set(_hdf5_location_debug "${HDF5_${hdf5_target_name}_LIBRARY_DEBUG}") elseif (DEFINED "HDF5_${hdf5_lang}_HL_LIBRARY") set(_hdf5_location "${HDF5_${hdf5_lang}_HL_LIBRARY}") + set(_hdf5_location_release "${HDF5_${hdf5_lang}_HL_LIBRARY_RELEASE}") + set(_hdf5_location_debug "${HDF5_${hdf5_lang}_HL_LIBRARY_DEBUG}") elseif (DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}") set(_hdf5_location "${HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}}") elseif (hdf5_alt_target_name AND DEFINED "HDF5_${hdf5_lang}_LIBRARY_${hdf5_alt_target_name}") @@ -1126,10 +1150,24 @@ if (HDF5_FOUND) add_library("hdf5::${hdf5_target_name}" UNKNOWN IMPORTED) string(REPLACE "-D" "" _hdf5_definitions "${HDF5_${hdf5_lang}_HL_DEFINITIONS}") set_target_properties("hdf5::${hdf5_target_name}" PROPERTIES - IMPORTED_LOCATION "${_hdf5_location}" - IMPORTED_IMPLIB "${_hdf5_location}" INTERFACE_INCLUDE_DIRECTORIES "${HDF5_${hdf5_lang}_HL_INCLUDE_DIRS}" INTERFACE_COMPILE_DEFINITIONS "${_hdf5_definitions}") + if (_hdf5_location_release) + set_property(TARGET "hdf5::${hdf5_target_name}" APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_property(TARGET "hdf5::${hdf5_target_name}" PROPERTY + IMPORTED_LOCATION_RELEASE "${_hdf5_location_release}") + endif() + if (_hdf5_location_debug) + set_property(TARGET "hdf5::${hdf5_target_name}" APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_property(TARGET "hdf5::${hdf5_target_name}" PROPERTY + IMPORTED_LOCATION_DEBUG "${_hdf5_location_debug}") + endif() + if (NOT _hdf5_location_release AND NOT _hdf5_location_debug) + set_property(TARGET "hdf5::${hdf5_target_name}" PROPERTY + IMPORTED_LOCATION "${_hdf5_location}") + endif() if (_hdf5_libtype STREQUAL "SHARED") set_property(TARGET "hdf5::${hdf5_target_name}" APPEND PROPERTY diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake index 759f57c..a80758d 100644 --- a/Modules/FindRuby.cmake +++ b/Modules/FindRuby.cmake @@ -8,7 +8,7 @@ FindRuby Find Ruby This module finds if Ruby is installed and determines where the -include files and libraries are. Ruby 1.8 through 2.7 are +include files and libraries are. Ruby 1.8 through 3.1 are supported. The minimum required version of Ruby can be specified using the @@ -139,13 +139,13 @@ set(Ruby_FIND_VERSION_SHORT_NODOT "${Ruby_FIND_VERSION_MAJOR}${Ruby_FIND_VERSION # Set name of possible executables, ignoring the minor # Eg: -# 2.1.1 => from ruby27 to ruby21 included -# 2.1 => from ruby27 to ruby21 included -# 2 => from ruby26 to ruby20 included -# empty => from ruby27 to ruby18 included +# 2.1.1 => from ruby31 to ruby21 included +# 2.1 => from ruby31 to ruby21 included +# 2 => from ruby31 to ruby20 included +# empty => from ruby31 to ruby18 included if(NOT Ruby_FIND_VERSION_EXACT) - foreach(_ruby_version RANGE 27 18 -1) + foreach(_ruby_version RANGE 31 18 -1) string(SUBSTRING "${_ruby_version}" 0 1 _ruby_major_version) string(SUBSTRING "${_ruby_version}" 1 1 _ruby_minor_version) @@ -266,9 +266,20 @@ while(1) _RUBY_VALIDATE_INTERPRETER (${Ruby_FIND_VERSION}) if (Ruby_EXECUTABLE) break() + else() + # Remove first entry from names list. + LIST(REMOVE_AT _Ruby_POSSIBLE_EXECUTABLE_NAMES 0) + + # If the list is now empty, abort. + if (NOT _Ruby_POSSIBLE_EXECUTABLE_NAMES) + break() + else() + # Otherwise, continue with the remaining list. Make sure that we clear + # the cached variable. + unset(Ruby_EXECUTABLE CACHE) + endif() endif() - break() endwhile() if(Ruby_EXECUTABLE AND NOT Ruby_VERSION_MAJOR) @@ -398,6 +409,16 @@ if(Ruby_EXECUTABLE AND NOT Ruby_VERSION_MAJOR) set(Ruby_VERSION_MAJOR 2) set(Ruby_VERSION_MINOR 7) endif() + # check whether we found 3.0.x + if(${Ruby_EXECUTABLE} MATCHES "ruby3\\.?0") + set(Ruby_VERSION_MAJOR 3) + set(Ruby_VERSION_MINOR 0) + endif() + # check whether we found 3.1.x + if(${Ruby_EXECUTABLE} MATCHES "ruby3\\.?1") + set(Ruby_VERSION_MAJOR 3) + set(Ruby_VERSION_MINOR 1) + endif() endif() if(Ruby_VERSION_MAJOR) diff --git a/Modules/Internal/CPack/NSIS.template.in b/Modules/Internal/CPack/NSIS.template.in index 8a0c972..e3abf22 100644 --- a/Modules/Internal/CPack/NSIS.template.in +++ b/Modules/Internal/CPack/NSIS.template.in @@ -531,7 +531,6 @@ FunctionEnd @CPACK_NSIS_INSTALLER_ICON_CODE@ @CPACK_NSIS_INSTALLER_MUI_WELCOMEFINISH_CODE@ @CPACK_NSIS_INSTALLER_MUI_UNWELCOMEFINISH_CODE@ -@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@ @CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@ ;-------------------------------- @@ -648,7 +647,7 @@ FunctionEnd ;-------------------------------- ; Component sections @CPACK_NSIS_COMPONENT_SECTIONS@ - +@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@ ;-------------------------------- ;Installer Sections |