summaryrefslogtreecommitdiffstats
path: root/Modules/FindHDF5.cmake
diff options
context:
space:
mode:
authorWill Dicharry <wdicharry@stellarscience.com>2009-08-24 17:24:57 (GMT)
committerWill Dicharry <wdicharry@stellarscience.com>2009-08-24 17:24:57 (GMT)
commitc9686f62afb9078b0ba4521818106bb4d42947e0 (patch)
tree3bf03c3c2d805c9739a99a8fb16645d1df93a247 /Modules/FindHDF5.cmake
parent8aaf3cebeb0388eb7dde7b49ce4e7150b65908d7 (diff)
downloadCMake-c9686f62afb9078b0ba4521818106bb4d42947e0.zip
CMake-c9686f62afb9078b0ba4521818106bb4d42947e0.tar.gz
CMake-c9686f62afb9078b0ba4521818106bb4d42947e0.tar.bz2
Fixed HDF5 Find module error that caused no list to be passed into remove duplicates when HDF5 is not found.
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r--Modules/FindHDF5.cmake16
1 files changed, 12 insertions, 4 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 487031f..95a003c 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -253,10 +253,18 @@ else()
# 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.
- list( REMOVE_DUPLICATES HDF5_INCLUDE_DIR )
- list( REMOVE_DUPLICATES HDF5_LIBRARIES_DEBUG )
- list( REMOVE_DUPLICATES HDF5_LIBRARIES_RELEASE )
- list( REMOVE_DUPLICATES HDF5_LIBRARY_DIRS )
+ if( HDF5_INCLUDE_DIR )
+ list( REMOVE_DUPLICATES HDF5_INCLUDE_DIR )
+ endif()
+ if( HDF5_LIBRARIES_DEBUG )
+ list( REMOVE_DUPLICATES HDF5_LIBRARIES_DEBUG )
+ endif()
+ if( HDF5_LIBRARIES_RELEASE )
+ list( REMOVE_DUPLICATES HDF5_LIBRARIES_RELEASE )
+ endif()
+ if( HDF5_LIBRARY_DIRS )
+ list( REMOVE_DUPLICATES HDF5_LIBRARY_DIRS )
+ endif()
# Construct the complete list of HDF5 libraries with debug and optimized
# variants when the generator supports them.