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  2c7b8fca4f37ccf4030e7df1173e7836363c4024 (commit)
       via  ad1626818f052371af2401857806cd67d7660b31 (commit)
      from  4fd926b7feab3d7f36ae9316a5f36e4e9aed1da9 (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=2c7b8fca4f37ccf4030e7df1173e7836363c4024
commit 2c7b8fca4f37ccf4030e7df1173e7836363c4024
Merge: 4fd926b ad16268
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Jul 11 14:04:10 2016 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Mon Jul 11 14:04:10 2016 -0400

    Merge topic 'FindHDF5-fix-homebrew' into next
    
    ad162681 Revert "FindHDF5: Fix h5cc arg parsing to work with homebrew on 
Mac"


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad1626818f052371af2401857806cd67d7660b31
commit ad1626818f052371af2401857806cd67d7660b31
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Jul 11 14:03:41 2016 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Jul 11 14:03:41 2016 -0400

    Revert "FindHDF5: Fix h5cc arg parsing to work with homebrew on Mac"
    
    This reverts commit a7d2852634aa40cbd6e7177587b42607986aca6b.
    It will be revised and restored.

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index f644a17..b074f63 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -267,20 +267,8 @@ endfunction()
 # return_value argument, the text output is stored to the output variable.
 macro( _HDF5_invoke_compiler language output return_value version)
     set(${version})
-    if(HDF5_USE_STATIC_LIBRARIES)
-       set(_ltargs -noshlib)
-     else()
-       set(_ltargs -shlib)
-    endif()
-    if(language STREQUAL "C")
-        set(_sourcefile test_hdf5.c)
-    elseif(language STREQUAL "CXX")
-        set(_sourcefile test_hdf5.cxx)
-    elseif(language STREQUAL "Fortran")
-        set(_sourcefile test_hdf5.f90)
-    endif()
     exec_program( ${HDF5_${language}_COMPILER_EXECUTABLE}
-        ARGS -show ${_ltargs} ${_sourcefile}
+        ARGS -show
         OUTPUT_VARIABLE ${output}
         RETURN_VALUE ${return_value}
     )
@@ -333,6 +321,7 @@ macro( _HDF5_parse_compile_line
     string( REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" library_path_flags
         "${${compile_line_var}}"
     )
+
     foreach( LPATH ${library_path_flags} )
         string( REGEX REPLACE "^-L" "" LPATH ${LPATH} )
         string( REPLACE "//" "/" LPATH ${LPATH} )
@@ -342,32 +331,17 @@ macro( _HDF5_parse_compile_line
     # now search for the library names specified in the compile line (match 
-l...)
     # match only -l's preceded by a space or comma
     # this is to exclude directory names like xxx-linux/
-    string( REGEX MATCHALL "[, ]+-l([^\", ]+)" library_name_flags
+    string( REGEX MATCHALL "[, ]-l([^\", ]+)" library_name_flags
         "${${compile_line_var}}" )
+    # strip the -l from all of the library flags and add to the search list
     foreach( LIB ${library_name_flags} )
-        string( REGEX REPLACE "^[, ]+-l" "" LIB ${LIB} )
-        if(LIB MATCHES ".*hl")
+        string( REGEX REPLACE "^[, ]-l" "" LIB ${LIB} )
+        if(LIB MATCHES ".*_hl")
             list(APPEND ${libraries_hl} ${LIB})
         else()
             list(APPEND ${libraries} ${LIB})
         endif()
     endforeach()
-
-    # now search for full library paths with no flags
-    string( REGEX MATCHALL "[, ][^\-]([^\", ]+)" library_name_noflags
-        "${${compile_line_var}}" )
-    foreach( LIB ${library_name_noflags})
-        string( REGEX REPLACE "^[, ]+" "" LIB ${LIB} )
-        get_filename_component(LIB_DIR ${LIB} DIRECTORY)
-        get_filename_component(LIB_NAME ${LIB} NAME_WE)
-        string( REGEX REPLACE "^lib" "" LIB_NAME ${LIB_NAME} )
-        list( APPEND ${library_paths} ${LIB_DIR} )
-        if(LIB_NAME MATCHES ".*hl")
-            list(APPEND ${libraries_hl} ${LIB_NAME})
-        else()
-            list(APPEND ${libraries} ${LIB_NAME})
-        endif()
-    endforeach()
 endmacro()
 
 # Try to find HDF5 using an installed hdf5-config.cmake
@@ -485,14 +459,6 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
             HDF5_${__lang}_HL_LIBRARY_NAMES
           )
           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)
             find_library(HDF5_${__lang}_LIBRARY_${L} ${L} 
${HDF5_${__lang}_LIBRARY_DIRS})
             if(HDF5_${__lang}_LIBRARY_${L})
@@ -512,9 +478,6 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
               endif()
             endforeach()
           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 |   49 ++++++------------------------------------------
 1 file changed, 6 insertions(+), 43 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to