diff options
-rw-r--r-- | Help/variable/CMAKE_OSX_VARIABLE.txt | 3 | ||||
-rw-r--r-- | Modules/FindHDF5.cmake | 8 | ||||
-rw-r--r-- | Modules/Platform/Linux-LCC-Fortran.cmake | 6 |
3 files changed, 11 insertions, 6 deletions
diff --git a/Help/variable/CMAKE_OSX_VARIABLE.txt b/Help/variable/CMAKE_OSX_VARIABLE.txt index 16f3c1a..5670980 100644 --- a/Help/variable/CMAKE_OSX_VARIABLE.txt +++ b/Help/variable/CMAKE_OSX_VARIABLE.txt @@ -3,7 +3,8 @@ The value of this variable should be set prior to the first because it may influence configuration of the toolchain and flags. It is intended to be set locally by the user creating a build tree. This variable should be set as a ``CACHE`` entry (or else CMake may -remove it while initializing a cache entry of the same name). +remove it while initializing a cache entry of the same name) unless +policy :policy:`CMP0126` is set to ``NEW``. Despite the ``OSX`` part in the variable name(s) they apply also to other SDKs than macOS like iOS, tvOS, or watchOS. diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 46ad015..40ed9a9 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -555,8 +555,8 @@ if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE) endif() if( _hdf5_lang_location ) set(HDF5_${_lang}_LIBRARY ${_hdf5_lang_location}) - list(APPEND HDF5_LIBRARIES ${HDF5_${_lang}_LIBRARY}) - set(HDF5_${_lang}_LIBRARIES ${HDF5_${_lang}_LIBRARY}) + list(APPEND HDF5_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix}) + set(HDF5_${_lang}_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix}) set(HDF5_${_lang}_FOUND TRUE) endif() if(HDF5_FIND_HL) @@ -569,8 +569,8 @@ if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE) endif() if( _hdf5_lang_hl_location ) set(HDF5_${_lang}_HL_LIBRARY ${_hdf5_lang_hl_location}) - list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_HL_LIBRARY}) - set(HDF5_${_lang}_HL_LIBRARIES ${HDF5_${_lang}_HL_LIBRARY}) + list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_HL_TARGET}${_suffix}) + set(HDF5_${_lang}_HL_LIBRARIES ${HDF5_${_lang}_HL_TARGET}${_suffix}) set(HDF5_HL_FOUND TRUE) endif() unset(_hdf5_lang_hl_location) diff --git a/Modules/Platform/Linux-LCC-Fortran.cmake b/Modules/Platform/Linux-LCC-Fortran.cmake index d3a4cf4..bf2a1c2 100644 --- a/Modules/Platform/Linux-LCC-Fortran.cmake +++ b/Modules/Platform/Linux-LCC-Fortran.cmake @@ -1,3 +1,7 @@ include(Platform/Linux-LCC) __linux_compiler_lcc(Fortran) -set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-llfortran") +if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS "1.26.03") + set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-llfortran") +else() + set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-lgfortran") +endif() |