[Cmake-commits] CMake branch, next, updated. v2.8.4-1609-g0ce6545

Will Dicharry wdicharry at stellarscience.com
Wed May 25 14:56:13 EDT 2011


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  0ce6545765effbcb9c9db0f60e5e1ad08627f229 (commit)
       via  93ba19e0709168e3c820f7936f81c0927b7bb392 (commit)
       via  0584701ae4c73f0867734acb19c6ed92507ce514 (commit)
       via  4e1228442429c526c451426cdf75c3ae08581103 (commit)
       via  2ba826e0600902b01750d345e2f51dd3ab0a9c4a (commit)
      from  905d3b5c254c25e9fb9838ba05b76c4f2da65679 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0ce6545765effbcb9c9db0f60e5e1ad08627f229
commit 0ce6545765effbcb9c9db0f60e5e1ad08627f229
Merge: 905d3b5 93ba19e
Author:     Will Dicharry <wdicharry at stellarscience.com>
AuthorDate: Wed May 25 14:56:11 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 25 14:56:11 2011 -0400

    Merge topic 'hdf5-module-bug-fix' into next
    
    93ba19e FindHDF5 ensures good link lines when libraries are duplicated.
    0584701 Fix for bug 11752, mixed debug and release libraries.
    4e12284 Use HDF5_FOUND to control autoconf and CMake built FindHDF5.
    2ba826e Use CMAKE_CURRENT_LIST_DIR to locate FindPackageHandleStandardArgs.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=93ba19e0709168e3c820f7936f81c0927b7bb392
commit 93ba19e0709168e3c820f7936f81c0927b7bb392
Author:     Will Dicharry <wdicharry at stellarscience.com>
AuthorDate: Wed May 25 12:53:28 2011 -0600
Commit:     Will Dicharry <wdicharry at stellarscience.com>
CommitDate: Wed May 25 12:53:28 2011 -0600

    FindHDF5 ensures good link lines when libraries are duplicated.
    
    Duplicates must be removed from the beginning of the link libraries
    to ensure unresolved symbols can be found.

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index f1805cd..92dad21 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -307,18 +307,29 @@ if( NOT HDF5_FOUND )
 
     # We may have picked up some duplicates in various lists during the above
     # process for the language bindings (both the C and C++ bindings depend on
-    # libz for example).  Remove the duplicates.
+    # libz for example).  Remove the duplicates. It appears that the default
+    # CMake behavior is to remove duplicates from the end of a list. However,
+    # for link lines, this is incorrect since unresolved symbols are searched
+    # for down the link line. Therefore, we reverse the list, remove the
+    # duplicates, and then reverse it again to get the duplicates removed from
+    # the beginning.
+    macro( _remove_duplicates_from_beginning _list_name )
+        list( REVERSE ${_list_name} )
+        list( REMOVE_DUPLICATES ${_list_name} )
+        list( REVERSE ${_list_name} )
+    endmacro()
+
     if( HDF5_INCLUDE_DIRS )
-        list( REMOVE_DUPLICATES HDF5_INCLUDE_DIRS )
+        _remove_duplicates_from_beginning( HDF5_INCLUDE_DIRS )
     endif()
     if( HDF5_LIBRARIES_DEBUG )
-        list( REMOVE_DUPLICATES HDF5_LIBRARIES_DEBUG )
+        _remove_duplicates_from_beginning( HDF5_LIBRARIES_DEBUG )
     endif()
     if( HDF5_LIBRARIES_RELEASE )
-        list( REMOVE_DUPLICATES HDF5_LIBRARIES_RELEASE )
+        _remove_duplicates_from_beginning( HDF5_LIBRARIES_RELEASE )
     endif()
     if( HDF5_LIBRARY_DIRS )
-        list( REMOVE_DUPLICATES HDF5_LIBRARY_DIRS )
+        _remove_duplicates_from_beginning( HDF5_LIBRARY_DIRS )
     endif()
 
     # Construct the complete list of HDF5 libraries with debug and optimized

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0584701ae4c73f0867734acb19c6ed92507ce514
commit 0584701ae4c73f0867734acb19c6ed92507ce514
Author:     Will Dicharry <wdicharry at stellarscience.com>
AuthorDate: Wed May 25 12:38:54 2011 -0600
Commit:     Will Dicharry <wdicharry at stellarscience.com>
CommitDate: Wed May 25 12:38:54 2011 -0600

    Fix for bug 11752, mixed debug and release libraries.

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 1b41ae6..f1805cd 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -324,9 +324,13 @@ if( NOT HDF5_FOUND )
     # Construct the complete list of HDF5 libraries with debug and optimized
     # variants when the generator supports them.
     if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
-        set( HDF5_LIBRARIES
-            debug ${HDF5_LIBRARIES_DEBUG}
-            optimized ${HDF5_LIBRARIES_RELEASE} )
+        set( HDF5_LIBRARIES )
+        foreach( _lib ${HDF5_LIBRARIES_DEBUG} )
+            list( APPEND HDF5_LIBRARIES debug ${_lib} )
+        endforeach()
+        foreach( _lib ${HDF5_LIBRARIES_RELEASE} )
+            list( APPEND HDF5_LIBRARIES optimized ${_lib} )
+        endforeach()
     else()
         set( HDF5_LIBRARIES ${HDF5_LIBRARIES_RELEASE} )
     endif()

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e1228442429c526c451426cdf75c3ae08581103
commit 4e1228442429c526c451426cdf75c3ae08581103
Author:     Will Dicharry <wdicharry at stellarscience.com>
AuthorDate: Tue May 24 15:27:30 2011 -0600
Commit:     Will Dicharry <wdicharry at stellarscience.com>
CommitDate: Wed May 25 12:34:21 2011 -0600

    Use HDF5_FOUND to control autoconf and CMake built FindHDF5.

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 3c96720..1b41ae6 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -180,30 +180,29 @@ macro( _HDF5_parse_compile_line
 endmacro()
 
 # Try to find HDF5 using an installed hdf5-config.cmake
-find_package( HDF5 QUIET NO_MODULE )
-if( HDF5_INCLUDE_DIR )
-    set( HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR} )
-    set( HDF5_LIBRARIES )
-    set( HDF5_C_TARGET hdf5 )
-    set( HDF5_CXX_TARGET hdf5_cpp )
-    set( HDF5_HL_TARGET hdf5_hl )
-    set( HDF5_Fortran_TARGET hdf5_fortran )
-    foreach( _component ${HDF5_LANGUAGE_BINDINGS} )
-        list( FIND HDF5_VALID_COMPONENTS ${_component} _component_location )
-        get_target_property( _comp_location ${HDF5_${_component}_TARGET} LOCATION )
-        if( _comp_location )
-            set( HDF5_${_component}_LIBRARY ${_comp_location} CACHE PATH
-                "HDF5 ${_component} library" )
-            mark_as_advanced( HDF5_${_component}_LIBRARY )
-            list( APPEND HDF5_LIBRARIES ${HDF5_${_component}_LIBRARY} )
-        endif()
-    endforeach()
+if( NOT HDF5_FOUND )
+    find_package( HDF5 QUIET NO_MODULE )
+    if( HDF5_FOUND )
+        set( HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR} )
+        set( HDF5_LIBRARIES )
+        set( HDF5_C_TARGET hdf5 )
+        set( HDF5_CXX_TARGET hdf5_cpp )
+        set( HDF5_HL_TARGET hdf5_hl )
+        set( HDF5_Fortran_TARGET hdf5_fortran )
+        foreach( _component ${HDF5_LANGUAGE_BINDINGS} )
+            list( FIND HDF5_VALID_COMPONENTS ${_component} _component_location )
+            get_target_property( _comp_location ${HDF5_${_component}_TARGET} LOCATION )
+            if( _comp_location )
+                set( HDF5_${_component}_LIBRARY ${_comp_location} CACHE PATH
+                    "HDF5 ${_component} library" )
+                mark_as_advanced( HDF5_${_component}_LIBRARY )
+                list( APPEND HDF5_LIBRARIES ${HDF5_${_component}_LIBRARY} )
+            endif()
+        endforeach()
+    endif()
 endif()
 
-if( HDF5_INCLUDE_DIRS AND HDF5_LIBRARIES )
-    # Do nothing: we already have HDF5_INCLUDE_PATH and HDF5_LIBRARIES in the
-    # cache, it would be a shame to override them
-else()
+if( NOT HDF5_FOUND )
     _HDF5_invoke_compiler( C HDF5_C_COMPILE_LINE HDF5_C_RETURN_VALUE )
     _HDF5_invoke_compiler( CXX HDF5_CXX_COMPILE_LINE HDF5_CXX_RETURN_VALUE )
     _HDF5_invoke_compiler( Fortran HDF5_Fortran_COMPILE_LINE HDF5_Fortran_RETURN_VALUE )
@@ -259,9 +258,7 @@ else()
             ${HDF5_${LANGUAGE}_LIBRARY_NAMES} )
         
         # find the HDF5 libraries
-        message( STATUS "FindHDF5 -- search for ${LANGUAGE}" )
         foreach( LIB ${HDF5_${LANGUAGE}_LIBRARY_NAMES} )
-            message( STATUS "FindHDF5 -- Searching for ${LIB}" )
             if( UNIX AND HDF5_USE_STATIC_LIBRARIES )
                 # According to bug 1643 on the CMake bug tracker, this is the
                 # preferred method for searching for a static library.
@@ -358,16 +355,18 @@ find_package_handle_standard_args( HDF5 DEFAULT_MSG
     HDF5_INCLUDE_DIRS
 )
 
-mark_as_advanced( 
-    HDF5_INCLUDE_DIRS 
-    HDF5_LIBRARIES 
-    HDF5_DEFINTIONS
-    HDF5_LIBRARY_DIRS
-    HDF5_C_COMPILER_EXECUTABLE
-    HDF5_CXX_COMPILER_EXECUTABLE
-    HDF5_Fortran_COMPILER_EXECUTABLE )
+if( HDF5_FOUND )
+    mark_as_advanced(
+        HDF5_INCLUDE_DIRS
+        HDF5_LIBRARIES
+        HDF5_DEFINTIONS
+        HDF5_LIBRARY_DIRS
+        HDF5_C_COMPILER_EXECUTABLE
+        HDF5_CXX_COMPILER_EXECUTABLE
+        HDF5_Fortran_COMPILER_EXECUTABLE )
 
-# For backwards compatibility we set HDF5_INCLUDE_DIR to the value of
-# HDF5_INCLUDE_DIRS
-set( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
+    # For backwards compatibility we set HDF5_INCLUDE_DIR to the value of
+    # HDF5_INCLUDE_DIRS
+    set( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
+endif()
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2ba826e0600902b01750d345e2f51dd3ab0a9c4a
commit 2ba826e0600902b01750d345e2f51dd3ab0a9c4a
Author:     Will Dicharry <wdicharry at stellarscience.com>
AuthorDate: Tue May 24 12:53:49 2011 -0600
Commit:     Will Dicharry <wdicharry at stellarscience.com>
CommitDate: Tue May 24 12:53:49 2011 -0600

    Use CMAKE_CURRENT_LIST_DIR to locate FindPackageHandleStandardArgs.

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index f3afb69..3c96720 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -59,7 +59,7 @@
 # This module is maintained by Will Dicharry <wdicharry at stellarscience.com>.
 
 include(SelectLibraryConfigurations)
-include(FindPackageHandleStandardArgs)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 
 # List of the valid HDF5 components
 set( HDF5_VALID_COMPONENTS 

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

Summary of changes:
 Modules/FindHDF5.cmake |  102 +++++++++++++++++++++++++++---------------------
 1 files changed, 58 insertions(+), 44 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list