summaryrefslogtreecommitdiffstats
path: root/Modules/FindHDF5.cmake
diff options
context:
space:
mode:
authorWill Dicharry <wdicharry@stellarscience.com>2011-05-25 18:38:54 (GMT)
committerWill Dicharry <wdicharry@stellarscience.com>2011-05-25 18:38:54 (GMT)
commit0584701ae4c73f0867734acb19c6ed92507ce514 (patch)
tree252c6baeec3f9f8cbb6a451250024128c9ec31c5 /Modules/FindHDF5.cmake
parent4e1228442429c526c451426cdf75c3ae08581103 (diff)
downloadCMake-0584701ae4c73f0867734acb19c6ed92507ce514.zip
CMake-0584701ae4c73f0867734acb19c6ed92507ce514.tar.gz
CMake-0584701ae4c73f0867734acb19c6ed92507ce514.tar.bz2
Fix for bug 11752, mixed debug and release libraries.
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r--Modules/FindHDF5.cmake10
1 files changed, 7 insertions, 3 deletions
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()