summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-09-20 08:10:22 -0400
committerCMake Topic Stage <kwrobot@kitware.com>2013-09-20 08:10:22 -0400
commitd2cf4e990c3c9abc3b2036dfb78771c4eda2abe8 (patch)
tree2837485806434ad943ca8e7c5ce568568e19cd1a
parent45b182180c4203c909a31bee5da7c8bf713fbb14 (diff)
parent0f05961f03b2735b32e9da54b32287fb3631e76b (diff)
downloadcmake-d2cf4e990c3c9abc3b2036dfb78771c4eda2abe8.tar.gz
Merge topic 'FindHDF5-fix-lib-selection'
0f05961 FindHDF5: Fix regression in per-configuration library selection
-rw-r--r--Modules/FindHDF5.cmake38
1 files changed, 2 insertions, 36 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 851416439a..0c246a1df0 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 )