[Cmake-commits] CMake branch, next, updated. v3.7.2-2518-gf50c357
Brad King
brad.king at kitware.com
Fri Feb 3 09:11:59 EST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via f50c35777f571e941dcc9a5f1f1696babe885b6e (commit)
via a87b7cf205dc6952be402e7caf509be6d3842383 (commit)
via 812615097035bacfa405a5b87312a9385e93cccb (commit)
from 50be50f8fd017a4f014aded68d81e1955382db63 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f50c35777f571e941dcc9a5f1f1696babe885b6e
commit f50c35777f571e941dcc9a5f1f1696babe885b6e
Merge: 50be50f a87b7cf
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 3 09:11:58 2017 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 3 09:11:58 2017 -0500
Merge topic 'FindHDF5-fix-HDF5_ROOT' into next
a87b7cf2 fixup! FindHDF5: Fix command-line parsing argument extraction order
81261509 FindHDF5: Restore fallback to static libraries
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a87b7cf205dc6952be402e7caf509be6d3842383
commit a87b7cf205dc6952be402e7caf509be6d3842383
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 3 09:09:17 2017 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Feb 3 09:09:17 2017 -0500
fixup! FindHDF5: Fix command-line parsing argument extraction order
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index f73abcf..b10e313 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -356,7 +356,7 @@ macro( _HDF5_parse_compile_line
elseif("${arg}" MATCHES "^-L(.*)$")
# library search path
list(APPEND ${library_paths} "${CMAKE_MATCH_1}")
- elseif("${arg}" MATCHES "^-l(.*)hl$")
+ elseif("${arg}" MATCHES "^-l(hdf5.*hl.*)$")
# library name (hl)
list(APPEND ${libraries_hl} "${CMAKE_MATCH_1}")
elseif("${arg}" MATCHES "^-l(.*)$")
@@ -371,7 +371,7 @@ macro( _HDF5_parse_compile_line
get_filename_component(_HDF5_LNAME "${arg}" NAME_WE)
string(REGEX REPLACE "^lib" "" _HDF5_LNAME "${_HDF5_LNAME}")
list(APPEND ${library_paths} "${_HDF5_LPATH}")
- if(_HDF5_LNAME MATCHES ".*hl")
+ if(_HDF5_LNAME MATCHES "hdf5.*hl")
list(APPEND ${libraries_hl} "${_HDF5_LNAME}")
else()
list(APPEND ${libraries} "${_HDF5_LNAME}")
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=812615097035bacfa405a5b87312a9385e93cccb
commit 812615097035bacfa405a5b87312a9385e93cccb
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 3 08:51:52 2017 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Feb 3 08:57:00 2017 -0500
FindHDF5: Restore fallback to static libraries
Since commit v3.6.1~6^2~2 (FindHDF5: Fix h5cc arg parsing to work with
homebrew on Mac, 2016-07-11) we treated `HDF5_USE_STATIC_LIBRARIES` OFF
as a requirement for shared libraries. It is just supposed to be a
preference. Even if `HDF5_USE_STATIC_LIBRARIES` is not set we should
still fall back to finding static libraries if shared libraries are not
available.
Issue: #16566
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 4f79a32..f73abcf 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -518,28 +518,26 @@ if(NOT HDF5_FOUND)
)
set(HDF5_${__lang}_LIBRARIES)
- set(_HDF5_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
- if(HDF5_USE_STATIC_LIBRARIES)
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
- else()
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX})
- endif()
-
foreach(L IN LISTS HDF5_${__lang}_LIBRARY_NAMES)
+ set(_HDF5_SEARCH_NAMES_LOCAL)
if(x"${L}" MATCHES "hdf5")
# hdf5 library
set(_HDF5_SEARCH_OPTS_LOCAL ${_HDF5_SEARCH_OPTS})
+ if(UNIX AND HDF5_USE_STATIC_LIBRARIES)
+ set(_HDF5_SEARCH_NAMES_LOCAL lib${L}.a)
+ endif()
else()
# external library
set(_HDF5_SEARCH_OPTS_LOCAL)
endif()
find_library(HDF5_${__lang}_LIBRARY_${L}
- NAMES ${L}
+ NAMES ${_HDF5_SEARCH_NAMES_LOCAL} ${L} NAMES_PER_DIR
HINTS ${HDF5_${__lang}_LIBRARY_DIRS}
${HDF5_ROOT}
${_HDF5_SEARCH_OPTS_LOCAL}
)
unset(_HDF5_SEARCH_OPTS_LOCAL)
+ unset(_HDF5_SEARCH_NAMES_LOCAL)
if(HDF5_${__lang}_LIBRARY_${L})
list(APPEND HDF5_${__lang}_LIBRARIES ${HDF5_${__lang}_LIBRARY_${L}})
else()
@@ -549,20 +547,25 @@ if(NOT HDF5_FOUND)
if(FIND_HL)
set(HDF5_${__lang}_HL_LIBRARIES)
foreach(L IN LISTS HDF5_${__lang}_HL_LIBRARY_NAMES)
+ set(_HDF5_SEARCH_NAMES_LOCAL)
if("x${L}" MATCHES "hdf5")
# hdf5 library
set(_HDF5_SEARCH_OPTS_LOCAL ${_HDF5_SEARCH_OPTS})
+ if(UNIX AND HDF5_USE_STATIC_LIBRARIES)
+ set(_HDF5_SEARCH_NAMES_LOCAL lib${L}.a)
+ endif()
else()
# external library
set(_HDF5_SEARCH_OPTS_LOCAL)
endif()
find_library(HDF5_${__lang}_LIBRARY_${L}
- NAMES ${L}
+ NAMES ${_HDF5_SEARCH_NAMES_LOCAL} ${L} NAMES_PER_DIR
HINTS ${HDF5_${__lang}_LIBRARY_DIRS}
${HDF5_ROOT}
${_HDF5_SEARCH_OPTS_LOCAL}
)
unset(_HDF5_SEARCH_OPTS_LOCAL)
+ unset(_HDF5_SEARCH_NAMES_LOCAL)
if(HDF5_${__lang}_LIBRARY_${L})
list(APPEND HDF5_${__lang}_HL_LIBRARIES ${HDF5_${__lang}_LIBRARY_${L}})
else()
@@ -572,8 +575,6 @@ if(NOT HDF5_FOUND)
set(HDF5_HL_FOUND True)
endif()
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_HDF5_CMAKE_FIND_LIBRARY_SUFFIXES})
-
set(HDF5_${__lang}_FOUND True)
mark_as_advanced(HDF5_${__lang}_DEFINITIONS)
mark_as_advanced(HDF5_${__lang}_INCLUDE_DIRS)
-----------------------------------------------------------------------
Summary of changes:
Modules/FindHDF5.cmake | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list