[Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-261-g8d5ec21

Kitware Robot kwrobot at kitware.com
Tue Jul 11 07:35:07 EDT 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, master has been updated
       via  8d5ec219288b05379f19a23a0a0b4c8b76a17712 (commit)
       via  8f63f3495d30c38a953ac234f5d34578f7668b70 (commit)
       via  3cf267cfbf740e8c8dc28f132fff5042c7201d3d (commit)
       via  6848ff4ce54bedd5d0ef909f2bc08ab99dc0a513 (commit)
       via  6f131f49eee26dc5c342274f919e0ca1636182e5 (commit)
      from  e1476f96189fd361045d68fca60978106d8ee6e1 (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=8d5ec219288b05379f19a23a0a0b4c8b76a17712
commit 8d5ec219288b05379f19a23a0a0b4c8b76a17712
Merge: 8f63f34 3cf267c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jul 11 11:34:54 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Jul 11 07:34:58 2017 -0400

    Merge topic 'FindPkgConfig-rerun'
    
    3cf267cf FindPkgConfig: do not always rerun pkg_check_modules() with 2 arguments
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1036


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f63f3495d30c38a953ac234f5d34578f7668b70
commit 8f63f3495d30c38a953ac234f5d34578f7668b70
Merge: e1476f9 6848ff4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jul 11 11:34:17 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Jul 11 07:34:23 2017 -0400

    Merge topic 'FindHDF5-windows'
    
    6848ff4c FindHDF5: Define H5_BUILT_AS_DYNAMIC_LIB when using Windows DLLs
    6f131f49 FindHDF5: Add support for HDF5_USE_STATIC_LIBRARIES on Windows
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1023


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3cf267cfbf740e8c8dc28f132fff5042c7201d3d
commit 3cf267cfbf740e8c8dc28f132fff5042c7201d3d
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri Jul 7 22:38:52 2017 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 10 11:16:51 2017 -0400

    FindPkgConfig: do not always rerun pkg_check_modules() with 2 arguments
    
    Since commit v3.8.0-rc1~47^2 (FindPkgConfig: Recheck pkg-config on
    parameter change, 2017-01-17) calling `pkg_check_modules` always
    re-runs.  The problem is that if there are only 2 arguments passed to
    `pkg_check_modules```, then `_module0` will be set and `ARGN` will be
    empty.  When this is written to cache it will be stored as just the
    value of `_module0` without any semicolon, so on the next run this
    doesn't match the expected value and the search is rerun.
    
    Revise the logic to handle the case of empty `ARGN` separately.
    
    Fixes: #17003

diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index a5357fa..8ac1691 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -584,7 +584,9 @@ endmacro()
 macro(pkg_check_modules _prefix _module0)
   _pkgconfig_parse_options(_pkg_modules _pkg_is_required _pkg_is_silent _no_cmake_path _no_cmake_environment_path _imp_target "${_module0}" ${ARGN})
   # check cached value
-  if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND OR NOT "${__pkg_config_arguments_${_prefix}}" STREQUAL "${_module0};${ARGN}")
+  if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND OR
+      (NOT "${ARGN}" STREQUAL "" AND NOT "${__pkg_config_arguments_${_prefix}}" STREQUAL "${_module0};${ARGN}") OR
+      (    "${ARGN}" STREQUAL "" AND NOT "${__pkg_config_arguments_${_prefix}}" STREQUAL "${_module0}"))
     _pkg_check_modules_internal("${_pkg_is_required}" "${_pkg_is_silent}" ${_no_cmake_path} ${_no_cmake_environment_path} ${_imp_target} "${_prefix}" ${_pkg_modules})
 
     _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION})

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6848ff4ce54bedd5d0ef909f2bc08ab99dc0a513
commit 6848ff4ce54bedd5d0ef909f2bc08ab99dc0a513
Author:     Kris Thielemans <kris.f.thielemans at hotmail.com>
AuthorDate: Mon Jul 3 01:40:41 2017 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Jul 7 08:58:57 2017 -0400

    FindHDF5: Define H5_BUILT_AS_DYNAMIC_LIB when using Windows DLLs
    
    When searching for shared libraries on Windows, add
    H5_BUILT_AS_DYNAMIC_LIB to HDF5_DEFINITIONS so that the header file
    knows how to dllimport the symbols.

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index acf7cd4..48d5de4 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -733,6 +733,9 @@ if( NOT HDF5_FOUND )
             else()
                 set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_D ${LIB}_debug ${LIB}d-shared ${LIB}_D-shared ${LIB}_debug-shared)
                 set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ${LIB}-shared)
+                if(WIN32)
+                  list(APPEND HDF5_DEFINITIONS "-DH5_BUILT_AS_DYNAMIC_LIB")
+                endif()
             endif()
             find_library(HDF5_${LIB}_LIBRARY_DEBUG
                 NAMES ${THIS_LIBRARY_SEARCH_DEBUG}
@@ -794,6 +797,7 @@ if( NOT HDF5_FOUND )
         set(HDF5_HL_FOUND True)
     endif()
 
+    _HDF5_remove_duplicates_from_beginning(HDF5_DEFINITIONS)
     _HDF5_remove_duplicates_from_beginning(HDF5_INCLUDE_DIRS)
     _HDF5_remove_duplicates_from_beginning(HDF5_LIBRARIES)
     _HDF5_remove_duplicates_from_beginning(HDF5_HL_LIBRARIES)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f131f49eee26dc5c342274f919e0ca1636182e5
commit 6f131f49eee26dc5c342274f919e0ca1636182e5
Author:     Kris Thielemans <kris.f.thielemans at hotmail.com>
AuthorDate: Mon Jul 3 01:38:55 2017 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Jul 7 08:58:37 2017 -0400

    FindHDF5: Add support for HDF5_USE_STATIC_LIBRARIES on Windows
    
    Also add the `_D` suffix for debug libraries.

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 2d9d2a2..acf7cd4 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -23,7 +23,7 @@
 # Fortran_HL.  If the COMPONENTS argument is not given, the module will
 # attempt to find only the C bindings.
 #
-# On UNIX systems, this module will read the variable
+# This module will read the variable
 # HDF5_USE_STATIC_LIBRARIES to determine whether or not to prefer a
 # static link to a dynamic link for HDF5 and all of it's dependencies.
 # To use this feature, make sure that the HDF5_USE_STATIC_LIBRARIES
@@ -551,8 +551,12 @@ if(NOT HDF5_FOUND)
             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)
+              if(HDF5_USE_STATIC_LIBRARIES)
+                if(WIN32)
+                  set(_HDF5_SEARCH_NAMES_LOCAL lib${L})
+                else()
+                  set(_HDF5_SEARCH_NAMES_LOCAL lib${L}.a)
+                endif()
               endif()
             else()
               # external library
@@ -579,8 +583,12 @@ if(NOT HDF5_FOUND)
               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)
+                if(HDF5_USE_STATIC_LIBRARIES)
+                  if(WIN32)
+                    set(_HDF5_SEARCH_NAMES_LOCAL lib${L})
+                  else()
+                    set(_HDF5_SEARCH_NAMES_LOCAL lib${L}.a)
+                  endif()
                 endif()
               else()
                 # external library
@@ -712,18 +720,18 @@ if( NOT HDF5_FOUND )
 
         # find the HDF5 libraries
         foreach(LIB IN LISTS HDF5_${__lang}_LIBRARY_NAMES)
-            if(UNIX AND HDF5_USE_STATIC_LIBRARIES)
+            if(HDF5_USE_STATIC_LIBRARIES)
                 # According to bug 1643 on the CMake bug tracker, this is the
                 # preferred method for searching for a static library.
                 # See https://gitlab.kitware.com/cmake/cmake/issues/1643.  We search
                 # first for the full static library name, but fall back to a
                 # generic search on the name if the static search fails.
                 set( THIS_LIBRARY_SEARCH_DEBUG
-                    lib${LIB}d.a lib${LIB}_debug.a ${LIB}d ${LIB}_debug
-                    lib${LIB}d-static.a lib${LIB}_debug-static.a ${LIB}d-static ${LIB}_debug-static )
-                set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a ${LIB} lib${LIB}-static.a ${LIB}-static)
+                    lib${LIB}d.a lib${LIB}_debug.a lib${LIB}d lib${LIB}_D lib${LIB}_debug
+                    lib${LIB}d-static.a lib${LIB}_debug-static.a ${LIB}d-static ${LIB}_D-static ${LIB}_debug-static )
+                set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a lib${LIB} lib${LIB}-static.a ${LIB}-static)
             else()
-                set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_debug ${LIB}d-shared ${LIB}_debug-shared)
+                set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_D ${LIB}_debug ${LIB}d-shared ${LIB}_D-shared ${LIB}_debug-shared)
                 set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ${LIB}-shared)
             endif()
             find_library(HDF5_${LIB}_LIBRARY_DEBUG
@@ -749,18 +757,18 @@ if( NOT HDF5_FOUND )
 
         if(FIND_HL)
             foreach(LIB IN LISTS HDF5_${__lang}_HL_LIBRARY_NAMES)
-                if(UNIX AND HDF5_USE_STATIC_LIBRARIES)
+                if(HDF5_USE_STATIC_LIBRARIES)
                     # According to bug 1643 on the CMake bug tracker, this is the
                     # preferred method for searching for a static library.
                     # See https://gitlab.kitware.com/cmake/cmake/issues/1643.  We search
                     # first for the full static library name, but fall back to a
                     # generic search on the name if the static search fails.
                     set( THIS_LIBRARY_SEARCH_DEBUG
-                        lib${LIB}d.a lib${LIB}_debug.a ${LIB}d ${LIB}_debug
-                        lib${LIB}d-static.a lib${LIB}_debug-static.a ${LIB}d-static ${LIB}_debug-static )
-                    set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a ${LIB} lib${LIB}-static.a ${LIB}-static)
+                        lib${LIB}d.a lib${LIB}_debug.a lib${LIB}d lib${LIB}_D lib${LIB}_debug
+                        lib${LIB}d-static.a lib${LIB}_debug-static.a lib${LIB}d-static lib${LIB}_D-static lib${LIB}_debug-static )
+                    set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a ${LIB} lib${LIB}-static.a lib${LIB}-static)
                 else()
-                    set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_debug ${LIB}d-shared ${LIB}_debug-shared)
+                    set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_D ${LIB}_debug ${LIB}d-shared ${LIB}_D-shared ${LIB}_debug-shared)
                     set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ${LIB}-shared)
                 endif()
                 find_library(HDF5_${LIB}_LIBRARY_DEBUG

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindHDF5.cmake      |   42 +++++++++++++++++++++++++++---------------
 Modules/FindPkgConfig.cmake |    4 +++-
 2 files changed, 30 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list