[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-664-gedf4587

Brad King brad.king at kitware.com
Wed Mar 1 08:15:23 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  edf45878ed265bf1678b3fbb5b977085b048ac89 (commit)
       via  2186b323c0bc43b7eecec0f906cff9fe2e57fc0f (commit)
       via  16f1dd0d16365448f9d483a5d00aba356eb2906b (commit)
       via  b2de6da2f161cde26178e568974fa5ef7f7480fc (commit)
       via  003c91385a050fc3b469e9f4d1ccf22e70f0f709 (commit)
       via  bf67fff0356f1d0d6996a52eb6fda2358b17b57c (commit)
       via  e629be4a7affe8615c2321b1a08bebb42bb81b15 (commit)
       via  1c7a9119d29568a1e3da82e8e96c8db464d599ab (commit)
       via  8250a520aacdeab2c22a24bbd31c23fee787b86e (commit)
       via  4b847f12f645b953feada796de66bc40b876f4f5 (commit)
      from  7f38595c96edc9059776b1e8fe3b409f1082b45a (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=edf45878ed265bf1678b3fbb5b977085b048ac89
commit edf45878ed265bf1678b3fbb5b977085b048ac89
Merge: 7f38595 2186b32
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Mar 1 08:15:22 2017 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Mar 1 08:15:22 2017 -0500

    Merge topic 'FindHDF5-updates' into next
    
    2186b323 FindHDF5: initialize HDF5_DEFINITIONS when using hdf5-config.cmake
    16f1dd0d FindHDF5: document HDF5_<LANG>_DEFINITIONS
    b2de6da2 FindHDF5: use import libraries when using hdf5-config.cmake on Windows
    003c9138 FindHDF5: do not cache library locations when using hdf5-config.cmake
    bf67fff0 FindHDF5: recognize hdf5:: prefix when using hdf5-config.cmake
    e629be4a FindHDF5: fix typo in comment
    1c7a9119 FindHDF5: remove mark_as_advanced for non-cached variables
    8250a520 FindHDF5: add HDF5_FIND_DEBUG variable to get debugging output
    4b847f12 FindHDF5: hide HDF5_DIR if HDF5 was found in another way


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2186b323c0bc43b7eecec0f906cff9fe2e57fc0f
commit 2186b323c0bc43b7eecec0f906cff9fe2e57fc0f
Author:     Kris Thielemans <kris.f.thielemans at hotmail.com>
AuthorDate: Thu Feb 16 23:35:46 2017 +0000
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Mar 1 08:13:58 2017 -0500

    FindHDF5: initialize HDF5_DEFINITIONS when using hdf5-config.cmake

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 96d4960..927ec64 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -418,6 +418,7 @@ if(NOT HDF5_FOUND)
         set(HDF5_CXX_HL_TARGET ${_target_prefix}hdf5_hl_cpp)
         set(HDF5_Fortran_TARGET ${_target_prefix}hdf5_fortran)
         set(HDF5_Fortran_HL_TARGET ${_target_prefix}hdf5_hl_fortran)
+        set(HDF5_DEFINITIONS "")
         if(HDF5_USE_STATIC_LIBRARIES)
             set(_suffix "-static")
         else()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=16f1dd0d16365448f9d483a5d00aba356eb2906b
commit 16f1dd0d16365448f9d483a5d00aba356eb2906b
Author:     Kris Thielemans <kris.f.thielemans at hotmail.com>
AuthorDate: Thu Feb 16 23:35:46 2017 +0000
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Mar 1 08:13:58 2017 -0500

    FindHDF5: document HDF5_<LANG>_DEFINITIONS

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index a85b9ac..96d4960 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -59,12 +59,16 @@
 #                       bindings, if the HL component is enabled
 #
 # Available components are: C CXX Fortran and HL.  For each enabled language
-# binding, a corresponding HDF5_${LANG}_LIBRARIES variable will be defined.
+# binding, a corresponding HDF5_${LANG}_LIBRARIES variable, and potentially
+# HDF5_${LANG}_DEFINITIONS, will be defined.
 # If the HL component is enabled, then an HDF5_${LANG}_HL_LIBRARIES will
 # also be defined.  With all components enabled, the following variables will be defined:
 #
 # ::
 #
+#   HDF5_C_DEFINITIONS -- Required compiler definitions for HDF5 C bindings
+#   HDF5_CXX_DEFINITIONS -- Required compiler definitions for HDF5 C++ bindings
+#   HDF5_Fortran_DEFINITIONS -- Required compiler definitions for HDF5 Fortran bindings
 #   HDF5_C_LIBRARIES - Required libraries for the HDF5 C bindings
 #   HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings
 #   HDF5_Fortran_LIBRARIES - Required libraries for the HDF5 Fortran bindings

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b2de6da2f161cde26178e568974fa5ef7f7480fc
commit b2de6da2f161cde26178e568974fa5ef7f7480fc
Author:     Kris Thielemans <kris.f.thielemans at hotmail.com>
AuthorDate: Mon Feb 6 01:27:56 2017 +0000
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Mar 1 08:12:56 2017 -0500

    FindHDF5: use import libraries when using hdf5-config.cmake on Windows
    
    The `LOCATION` of imported shared libraries on Windows is that of the
    `.dll`.  Use the import library instead to get the `.lib` to be linked.
    
    Fixes: #16534

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index ae2c707..a85b9ac 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -436,8 +436,13 @@ if(NOT HDF5_FOUND)
             if(HDF5_FIND_DEBUG)
                 message(STATUS "Trying to get properties of target ${HDF5_${_lang}_TARGET}${_suffix}")
             endif()
-            get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION)
-
+            # Find library for this target. Complicated as on Windows with a DLL, we need to search for the import-lib.
+            get_target_property(_imported_conf ${HDF5_${_lang}_TARGET}${_suffix} IMPORTED_CONFIGURATIONS)
+            get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} IMPORTED_IMPLIB_${_imported_conf} )
+            if (NOT _lang_location)
+                # no import lib, just try LOCATION
+                get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION)
+            endif()
             if( _lang_location )
                 set(HDF5_${_lang}_LIBRARY ${_lang_location})
                 list(APPEND HDF5_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
@@ -445,7 +450,10 @@ if(NOT HDF5_FOUND)
                 set(HDF5_${_lang}_FOUND True)
             endif()
             if(FIND_HL)
-                get_target_property(_lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} LOCATION)
+                get_target_property(__lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} IMPORTED_IMPLIB_${_imported_conf} )
+                if (NOT _lang_hl_location)
+                    get_target_property(_lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} LOCATION)
+                endif()
                 if( _lang_hl_location )
                     set(HDF5_${_lang}_HL_LIBRARY ${_lang_hl_location})
                     list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=003c91385a050fc3b469e9f4d1ccf22e70f0f709
commit 003c91385a050fc3b469e9f4d1ccf22e70f0f709
Author:     Kris Thielemans <kris.f.thielemans at hotmail.com>
AuthorDate: Mon Feb 6 01:27:56 2017 +0000
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Mar 1 08:11:37 2017 -0500

    FindHDF5: do not cache library locations when using hdf5-config.cmake
    
    The imported targets provide a persistent reference of their location,
    so we do not need to cache the values.

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 8d2a034..ae2c707 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -439,9 +439,7 @@ if(NOT HDF5_FOUND)
             get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION)
 
             if( _lang_location )
-                set(HDF5_${_lang}_LIBRARY ${_lang_location} CACHE PATH
-                    "HDF5 ${_lang} library" )
-                mark_as_advanced(HDF5_${_lang}_LIBRARY)
+                set(HDF5_${_lang}_LIBRARY ${_lang_location})
                 list(APPEND HDF5_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
                 set(HDF5_${_lang}_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
                 set(HDF5_${_lang}_FOUND True)
@@ -449,9 +447,7 @@ if(NOT HDF5_FOUND)
             if(FIND_HL)
                 get_target_property(_lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} LOCATION)
                 if( _lang_hl_location )
-                    set(HDF5_${_lang}_HL_LIBRARY ${_lang_hl_location} CACHE PATH
-                        "HDF5 ${_lang} HL library" )
-                    mark_as_advanced(HDF5_${_lang}_HL_LIBRARY)
+                    set(HDF5_${_lang}_HL_LIBRARY ${_lang_hl_location})
                     list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
                     set(HDF5_${_lang}_HL_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
                     set(HDF5_HL_FOUND True)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf67fff0356f1d0d6996a52eb6fda2358b17b57c
commit bf67fff0356f1d0d6996a52eb6fda2358b17b57c
Author:     Kris Thielemans <kris.f.thielemans at hotmail.com>
AuthorDate: Mon Feb 6 01:27:56 2017 +0000
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Mar 1 08:11:22 2017 -0500

    FindHDF5: recognize hdf5:: prefix when using hdf5-config.cmake
    
    Some versions of HDF5 use this prefix on their imported targets.

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 1388aab..8d2a034 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -404,12 +404,16 @@ if(NOT HDF5_FOUND)
         set(HDF5_IS_PARALLEL ${HDF5_ENABLE_PARALLEL})
         set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
         set(HDF5_LIBRARIES)
-        set(HDF5_C_TARGET hdf5)
-        set(HDF5_C_HL_TARGET hdf5_hl)
-        set(HDF5_CXX_TARGET hdf5_cpp)
-        set(HDF5_CXX_HL_TARGET hdf5_hl_cpp)
-        set(HDF5_Fortran_TARGET hdf5_fortran)
-        set(HDF5_Fortran_HL_TARGET hdf5_hl_fortran)
+        if (NOT TARGET hdf5 AND NOT TARGET hdf5-static AND NOT TARGET hdf5-shared)
+            # Some HDF5 versions (e.g. 1.8.18) used hdf5::hdf5 etc
+            set(_target_prefix "hdf5::")
+        endif()
+        set(HDF5_C_TARGET ${_target_prefix}hdf5)
+        set(HDF5_C_HL_TARGET ${_target_prefix}hdf5_hl)
+        set(HDF5_CXX_TARGET ${_target_prefix}hdf5_cpp)
+        set(HDF5_CXX_HL_TARGET ${_target_prefix}hdf5_hl_cpp)
+        set(HDF5_Fortran_TARGET ${_target_prefix}hdf5_fortran)
+        set(HDF5_Fortran_HL_TARGET ${_target_prefix}hdf5_hl_fortran)
         if(HDF5_USE_STATIC_LIBRARIES)
             set(_suffix "-static")
         else()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e629be4a7affe8615c2321b1a08bebb42bb81b15
commit e629be4a7affe8615c2321b1a08bebb42bb81b15
Author:     Kris Thielemans <kris.f.thielemans at hotmail.com>
AuthorDate: Mon Feb 6 01:27:56 2017 +0000
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Mar 1 08:06:26 2017 -0500

    FindHDF5: fix typo in comment

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 875098e..1388aab 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -421,7 +421,7 @@ if(NOT HDF5_FOUND)
             #if we detect that occurrence clear the suffix
             if(_suffix AND NOT TARGET ${HDF5_${_lang}_TARGET}${_suffix})
               if(NOT TARGET ${HDF5_${_lang}_TARGET})
-                #cant find this component with our without the suffix
+                #cant find this component with or without the suffix
                 #so bail out, and let the following locate HDF5
                 set(HDF5_FOUND FALSE)
                 break()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c7a9119d29568a1e3da82e8e96c8db464d599ab
commit 1c7a9119d29568a1e3da82e8e96c8db464d599ab
Author:     Kris Thielemans <kris.f.thielemans at hotmail.com>
AuthorDate: Tue Feb 28 00:57:29 2017 +0000
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Mar 1 08:06:26 2017 -0500

    FindHDF5: remove mark_as_advanced for non-cached variables

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index f84b10e..875098e 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -492,10 +492,6 @@ if(NOT HDF5_FOUND)
       set(HDF5_${__lang}_HL_LIBRARIES)
 
       mark_as_advanced(HDF5_${__lang}_COMPILER_EXECUTABLE_NO_INTERROGATE)
-      mark_as_advanced(HDF5_${__lang}_DEFINITIONS)
-      mark_as_advanced(HDF5_${__lang}_INCLUDE_DIRS)
-      mark_as_advanced(HDF5_${__lang}_LIBRARIES)
-      mark_as_advanced(HDF5_${__lang}_HL_LIBRARIES)
 
       set(HDF5_${__lang}_FOUND True)
       set(HDF5_HL_FOUND True)
@@ -585,9 +581,6 @@ if(NOT HDF5_FOUND)
           endif()
 
           set(HDF5_${__lang}_FOUND True)
-          mark_as_advanced(HDF5_${__lang}_DEFINITIONS)
-          mark_as_advanced(HDF5_${__lang}_INCLUDE_DIRS)
-          mark_as_advanced(HDF5_${__lang}_LIBRARIES)
           _HDF5_remove_duplicates_from_beginning(HDF5_${__lang}_DEFINITIONS)
           _HDF5_remove_duplicates_from_beginning(HDF5_${__lang}_INCLUDE_DIRS)
           _HDF5_remove_duplicates_from_beginning(HDF5_${__lang}_LIBRARIES)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8250a520aacdeab2c22a24bbd31c23fee787b86e
commit 8250a520aacdeab2c22a24bbd31c23fee787b86e
Author:     Kris Thielemans <kris.f.thielemans at hotmail.com>
AuthorDate: Tue Feb 28 01:37:11 2017 +0000
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Feb 28 16:10:11 2017 -0500

    FindHDF5: add HDF5_FIND_DEBUG variable to get debugging output

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index c538a81..f84b10e 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -90,6 +90,8 @@
 # The following variable can be set to guide the search for HDF5 libraries and includes:
 #
 # HDF5_ROOT
+#
+# Set HDF5_FIND_DEBUG to true to get some extra debugging output.
 
 # This module is maintained by Will Dicharry <wdicharry at stellarscience.com>.
 
@@ -396,6 +398,9 @@ if(NOT HDF5_FOUND)
       ${_HDF5_SEARCH_OPTS}
       )
     if( HDF5_FOUND)
+        if(HDF5_FIND_DEBUG)
+            message(STATUS "Found HDF5 at ${HDF5_DIR} via NO_MODULE. Now trying to extract locations etc.")
+        endif()
         set(HDF5_IS_PARALLEL ${HDF5_ENABLE_PARALLEL})
         set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
         set(HDF5_LIBRARIES)
@@ -424,7 +429,11 @@ if(NOT HDF5_FOUND)
               set(_suffix "")
             endif()
 
+            if(HDF5_FIND_DEBUG)
+                message(STATUS "Trying to get properties of target ${HDF5_${_lang}_TARGET}${_suffix}")
+            endif()
             get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION)
+
             if( _lang_location )
                 set(HDF5_${_lang}_LIBRARY ${_lang_location} CACHE PATH
                     "HDF5 ${_lang} library" )
@@ -828,3 +837,17 @@ if( HDF5_FOUND AND NOT HDF5_DIR)
   # HDF5_DIR-NOT_FOUND while HDF5 was found.
   mark_as_advanced(HDF5_DIR)
 endif()
+
+if (HDF5_FIND_DEBUG)
+  message(STATUS "HDF5_DIR: ${HDF5_DIR}")
+  message(STATUS "HDF5_DEFINITIONS: ${HDF5_DEFINITIONS}")
+  message(STATUS "HDF5_INCLUDE_DIRS: ${HDF5_INCLUDE_DIRS}")
+  message(STATUS "HDF5_LIBRARIES: ${HDF5_LIBRARIES}")
+  foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS)
+    message(STATUS "HDF5_${__lang}_DEFINITIONS: ${HDF5_${__lang}_DEFINITIONS}")
+    message(STATUS "HDF5_${__lang}_INCLUDE_DIR: ${HDF5_${__lang}_INCLUDE_DIR}")
+    message(STATUS "HDF5_${__lang}_INCLUDE_DIRS: ${HDF5_${__lang}_INCLUDE_DIRS}")
+    message(STATUS "HDF5_${__lang}_LIBRARY: ${HDF5_${__lang}_LIBRARY}")
+    message(STATUS "HDF5_${__lang}_LIBRARIES: ${HDF5_${__lang}_LIBRARIES}")
+  endforeach()
+endif()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b847f12f645b953feada796de66bc40b876f4f5
commit 4b847f12f645b953feada796de66bc40b876f4f5
Author:     Kris Thielemans <kris.f.thielemans at hotmail.com>
AuthorDate: Tue Feb 28 01:00:27 2017 +0000
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Feb 28 16:01:04 2017 -0500

    FindHDF5: hide HDF5_DIR if HDF5 was found in another way

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 65a825d..c538a81 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -822,3 +822,9 @@ find_package_handle_standard_args(HDF5
 )
 
 unset(_HDF5_SEARCH_OPTS)
+
+if( HDF5_FOUND AND NOT HDF5_DIR)
+  # hide HDF5_DIR for the non-advanced user to avoid confusion with
+  # HDF5_DIR-NOT_FOUND while HDF5 was found.
+  mark_as_advanced(HDF5_DIR)
+endif()

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

Summary of changes:
 Modules/FindHDF5.cmake |   81 ++++++++++++++++++++++++++++++++++--------------
 1 file changed, 58 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list