diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2016-06-23 16:31:26 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2016-06-23 16:31:26 (GMT) |
commit | 9f2728cef3763dff93a43b933a10f32eb73f7c6b (patch) | |
tree | e8da34a4ba2b8e9c9d30001987df1ba337e8f002 /Modules | |
parent | 149539d9c2d90da76facbd70c969b82af8e2448a (diff) | |
download | CMake-9f2728cef3763dff93a43b933a10f32eb73f7c6b.zip CMake-9f2728cef3763dff93a43b933a10f32eb73f7c6b.tar.gz CMake-9f2728cef3763dff93a43b933a10f32eb73f7c6b.tar.bz2 |
FindHDF5: When component targets not found fallback to compiler wrappers
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindHDF5.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 53c0085..7c1581d 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -366,6 +366,12 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT) #Older versions of hdf5 don't have a static/shared suffix so #if we detect that occurrence clear the suffix if(_suffix AND NOT TARGET ${HDF5_${_lang}_TARGET}${_suffix}) + if(NOT TARGET ${HDF5_${_lang}_TARGET}) + #cant find this component with our without the suffix + #so bail out, and let the following locate HDF5 + set(HDF5_FOUND FALSE) + break() + endif() set(_suffix "") endif() |