From 003c91385a050fc3b469e9f4d1ccf22e70f0f709 Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Mon, 6 Feb 2017 01:27:56 +0000 Subject: 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. --- Modules/FindHDF5.cmake | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 8d2a034..ae2c707 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) -- cgit v0.12