diff options
author | Kris Thielemans <kris.f.thielemans@hotmail.com> | 2017-02-28 01:37:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-28 21:10:11 (GMT) |
commit | 8250a520aacdeab2c22a24bbd31c23fee787b86e (patch) | |
tree | d68ac904018418ced03bd6ad903f5d6d5f49a2f7 /Modules/FindHDF5.cmake | |
parent | 4b847f12f645b953feada796de66bc40b876f4f5 (diff) | |
download | CMake-8250a520aacdeab2c22a24bbd31c23fee787b86e.zip CMake-8250a520aacdeab2c22a24bbd31c23fee787b86e.tar.gz CMake-8250a520aacdeab2c22a24bbd31c23fee787b86e.tar.bz2 |
FindHDF5: add HDF5_FIND_DEBUG variable to get debugging output
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r-- | Modules/FindHDF5.cmake | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index c538a81..f84b10e 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -90,6 +90,8 @@ # The following variable can be set to guide the search for HDF5 libraries and includes: # # HDF5_ROOT +# +# Set HDF5_FIND_DEBUG to true to get some extra debugging output. # This module is maintained by Will Dicharry <wdicharry@stellarscience.com>. @@ -396,6 +398,9 @@ if(NOT HDF5_FOUND) ${_HDF5_SEARCH_OPTS} ) if( HDF5_FOUND) + if(HDF5_FIND_DEBUG) + message(STATUS "Found HDF5 at ${HDF5_DIR} via NO_MODULE. Now trying to extract locations etc.") + endif() set(HDF5_IS_PARALLEL ${HDF5_ENABLE_PARALLEL}) set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR}) set(HDF5_LIBRARIES) @@ -424,7 +429,11 @@ if(NOT HDF5_FOUND) set(_suffix "") endif() + if(HDF5_FIND_DEBUG) + message(STATUS "Trying to get properties of target ${HDF5_${_lang}_TARGET}${_suffix}") + endif() get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION) + if( _lang_location ) set(HDF5_${_lang}_LIBRARY ${_lang_location} CACHE PATH "HDF5 ${_lang} library" ) @@ -828,3 +837,17 @@ if( HDF5_FOUND AND NOT HDF5_DIR) # HDF5_DIR-NOT_FOUND while HDF5 was found. mark_as_advanced(HDF5_DIR) endif() + +if (HDF5_FIND_DEBUG) + message(STATUS "HDF5_DIR: ${HDF5_DIR}") + message(STATUS "HDF5_DEFINITIONS: ${HDF5_DEFINITIONS}") + message(STATUS "HDF5_INCLUDE_DIRS: ${HDF5_INCLUDE_DIRS}") + message(STATUS "HDF5_LIBRARIES: ${HDF5_LIBRARIES}") + foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS) + message(STATUS "HDF5_${__lang}_DEFINITIONS: ${HDF5_${__lang}_DEFINITIONS}") + message(STATUS "HDF5_${__lang}_INCLUDE_DIR: ${HDF5_${__lang}_INCLUDE_DIR}") + message(STATUS "HDF5_${__lang}_INCLUDE_DIRS: ${HDF5_${__lang}_INCLUDE_DIRS}") + message(STATUS "HDF5_${__lang}_LIBRARY: ${HDF5_${__lang}_LIBRARY}") + message(STATUS "HDF5_${__lang}_LIBRARIES: ${HDF5_${__lang}_LIBRARIES}") + endforeach() +endif() |