summaryrefslogtreecommitdiff
path: root/Modules/FindHDF5.cmake
diff options
context:
space:
mode:
authorKris Thielemans <kris.f.thielemans@hotmail.com>2017-02-06 01:27:56 +0000
committerBrad King <brad.king@kitware.com>2017-03-01 08:11:37 -0500
commit003c91385a050fc3b469e9f4d1ccf22e70f0f709 (patch)
treeeb6a7cff128375258c18f2c69826f1872995ccb3 /Modules/FindHDF5.cmake
parentbf67fff0356f1d0d6996a52eb6fda2358b17b57c (diff)
downloadcmake-003c91385a050fc3b469e9f4d1ccf22e70f0f709.tar.gz
FindHDF5: do not cache library locations when using hdf5-config.cmake
The imported targets provide a persistent reference of their location, so we do not need to cache the values.
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r--Modules/FindHDF5.cmake8
1 files changed, 2 insertions, 6 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 8d2a034e77..ae2c7073a8 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -439,9 +439,7 @@ if(NOT HDF5_FOUND)
get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION)
if( _lang_location )
- set(HDF5_${_lang}_LIBRARY ${_lang_location} CACHE PATH
- "HDF5 ${_lang} library" )
- mark_as_advanced(HDF5_${_lang}_LIBRARY)
+ set(HDF5_${_lang}_LIBRARY ${_lang_location})
list(APPEND HDF5_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
set(HDF5_${_lang}_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
set(HDF5_${_lang}_FOUND True)
@@ -449,9 +447,7 @@ if(NOT HDF5_FOUND)
if(FIND_HL)
get_target_property(_lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} LOCATION)
if( _lang_hl_location )
- set(HDF5_${_lang}_HL_LIBRARY ${_lang_hl_location} CACHE PATH
- "HDF5 ${_lang} HL library" )
- mark_as_advanced(HDF5_${_lang}_HL_LIBRARY)
+ set(HDF5_${_lang}_HL_LIBRARY ${_lang_hl_location})
list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
set(HDF5_${_lang}_HL_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
set(HDF5_HL_FOUND True)