Add patch to fix FindHDF5
This commit is contained in:
parent
830d0b05e0
commit
f068c62b0c
87
cmake-findhdf5.patch
Normal file
87
cmake-findhdf5.patch
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
From: Brad King <brad.king@kitware.com>
|
||||||
|
Date: Thu, 19 Sep 2013 17:29:02 +0000 (-0400)
|
||||||
|
Subject: FindHDF5: Fix regression in per-configuration library selection
|
||||||
|
X-Git-Url: http://cmake.org/gitweb?p=cmake.git;a=commitdiff_plain;h=0f05961f
|
||||||
|
|
||||||
|
FindHDF5: Fix regression in per-configuration library selection
|
||||||
|
|
||||||
|
When FindHDF5 was first added in commit e6734068 (Add HDF5 find
|
||||||
|
module..., 2009-08-24) it contained a workaround for a bug in
|
||||||
|
SelectLibraryConfigurations that did not transform lists correctly.
|
||||||
|
That bug was fixed by commit 5797512c (SelectLibraryConfiguration:
|
||||||
|
generate correct output when input vars are lists, 2012-07-28). Then
|
||||||
|
refactoring in commit 04d4dc33 (SelectLibraryConfigurations: Use
|
||||||
|
-NOTFOUND instead of copying the vars, 2013-07-08) changed undocumented
|
||||||
|
behavior on which the original workaround relied. The result puts
|
||||||
|
entries like HDF5_hdf5_LIBRARY_DEBUG-NOTFOUND in HDF5_LIBRARIES.
|
||||||
|
|
||||||
|
Fix this by dropping the original workaround since the underlying issue
|
||||||
|
has been fixed anyway. Use the HDF5_${LIB}_LIBRARY selected by the call
|
||||||
|
to select_library_configurations directly.
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
|
||||||
|
index 8514164..0c246a1 100644
|
||||||
|
--- a/Modules/FindHDF5.cmake
|
||||||
|
+++ b/Modules/FindHDF5.cmake
|
||||||
|
@@ -289,27 +289,13 @@ if( NOT HDF5_FOUND )
|
||||||
|
ENV HDF5_ROOT
|
||||||
|
PATH_SUFFIXES lib Lib )
|
||||||
|
select_library_configurations( HDF5_${LIB} )
|
||||||
|
- # even though we adjusted the individual library names in
|
||||||
|
- # select_library_configurations, we still need to distinguish
|
||||||
|
- # between debug and release variants because HDF5_LIBRARIES will
|
||||||
|
- # need to specify different lists for debug and optimized builds.
|
||||||
|
- # We can't just use the HDF5_${LIB}_LIBRARY variable (which was set
|
||||||
|
- # up by the selection macro above) because it may specify debug and
|
||||||
|
- # optimized variants for a particular library, but a list of
|
||||||
|
- # libraries is allowed to specify debug and optimized only once.
|
||||||
|
- list( APPEND HDF5_${LANGUAGE}_LIBRARIES_DEBUG
|
||||||
|
- ${HDF5_${LIB}_LIBRARY_DEBUG} )
|
||||||
|
- list( APPEND HDF5_${LANGUAGE}_LIBRARIES_RELEASE
|
||||||
|
- ${HDF5_${LIB}_LIBRARY_RELEASE} )
|
||||||
|
+ list(APPEND HDF5_${LANGUAGE}_LIBRARIES ${HDF5_${LIB}_LIBRARY})
|
||||||
|
endforeach()
|
||||||
|
list( APPEND HDF5_LIBRARY_DIRS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} )
|
||||||
|
|
||||||
|
# Append the libraries for this language binding to the list of all
|
||||||
|
# required libraries.
|
||||||
|
- list( APPEND HDF5_LIBRARIES_DEBUG
|
||||||
|
- ${HDF5_${LANGUAGE}_LIBRARIES_DEBUG} )
|
||||||
|
- list( APPEND HDF5_LIBRARIES_RELEASE
|
||||||
|
- ${HDF5_${LANGUAGE}_LIBRARIES_RELEASE} )
|
||||||
|
+ list(APPEND HDF5_LIBRARIES ${HDF5_${LANGUAGE}_LIBRARIES})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# We may have picked up some duplicates in various lists during the above
|
||||||
|
@@ -329,30 +315,10 @@ if( NOT HDF5_FOUND )
|
||||||
|
if( HDF5_INCLUDE_DIRS )
|
||||||
|
_remove_duplicates_from_beginning( HDF5_INCLUDE_DIRS )
|
||||||
|
endif()
|
||||||
|
- if( HDF5_LIBRARIES_DEBUG )
|
||||||
|
- _remove_duplicates_from_beginning( HDF5_LIBRARIES_DEBUG )
|
||||||
|
- endif()
|
||||||
|
- if( HDF5_LIBRARIES_RELEASE )
|
||||||
|
- _remove_duplicates_from_beginning( HDF5_LIBRARIES_RELEASE )
|
||||||
|
- endif()
|
||||||
|
if( HDF5_LIBRARY_DIRS )
|
||||||
|
_remove_duplicates_from_beginning( HDF5_LIBRARY_DIRS )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
- # 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 )
|
||||||
|
- 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()
|
||||||
|
-
|
||||||
|
# If the HDF5 include directory was found, open H5pubconf.h to determine if
|
||||||
|
# HDF5 was compiled with parallel IO support
|
||||||
|
set( HDF5_IS_PARALLEL FALSE )
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
Name: cmake
|
Name: cmake
|
||||||
Version: 2.8.12
|
Version: 2.8.12
|
||||||
Release: 0.4.rc3%{?dist}
|
Release: 0.5.rc3%{?dist}
|
||||||
Summary: Cross-platform make system
|
Summary: Cross-platform make system
|
||||||
|
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
@ -50,6 +50,8 @@ Patch6: cmake-strict_aliasing.patch
|
|||||||
# Patch away .png extension in icon name in desktop file.
|
# Patch away .png extension in icon name in desktop file.
|
||||||
# http://www.cmake.org/Bug/view.php?id=14315
|
# http://www.cmake.org/Bug/view.php?id=14315
|
||||||
Patch7: cmake-desktop_icon.patch
|
Patch7: cmake-desktop_icon.patch
|
||||||
|
# Patch to fix FindHDF5
|
||||||
|
Patch8: cmake-findhdf5.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildRequires: gcc-gfortran
|
BuildRequires: gcc-gfortran
|
||||||
@ -115,6 +117,7 @@ The %{name}-gui package contains the Qt based GUI for CMake.
|
|||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
|
%patch8 -p1
|
||||||
# Setup copyright docs for main package
|
# Setup copyright docs for main package
|
||||||
mkdir _doc
|
mkdir _doc
|
||||||
find Source Utilities -type f -iname copy\* | while read f
|
find Source Utilities -type f -iname copy\* | while read f
|
||||||
@ -223,6 +226,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 19 2013 Orion Poplawski <orion@cora.nwra.com> - 2.8.12-0.5.rc3
|
||||||
|
- Add patch to fix FindHDF5
|
||||||
|
|
||||||
* Tue Sep 17 2013 Orion Poplawski <orion@cora.nwra.com> - 2.8.12-0.4.rc3
|
* Tue Sep 17 2013 Orion Poplawski <orion@cora.nwra.com> - 2.8.12-0.4.rc3
|
||||||
- Update to 2.8.12-rc3
|
- Update to 2.8.12-rc3
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user