summaryrefslogtreecommitdiffstats
path: root/Modules/FindHDF5.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r--Modules/FindHDF5.cmake30
1 files changed, 21 insertions, 9 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index c1e6a64..a44c6f9 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -356,9 +356,13 @@ function( _HDF5_invoke_compiler language output_var return_value_var version_var
ERROR_VARIABLE output
RESULT_VARIABLE return_value
)
- if(return_value AND NOT HDF5_FIND_QUIETLY)
- message(STATUS
- "HDF5 ${language} compiler wrapper is unable to compile a minimal HDF5 program.")
+ if(NOT return_value EQUAL 0)
+ message(CONFIGURE_LOG
+ "HDF5 ${language} compiler wrapper is unable to compile a minimal HDF5 program.\n\n${output}")
+ if(NOT HDF5_FIND_QUIETLY)
+ message(STATUS
+ "HDF5 ${language} compiler wrapper is unable to compile a minimal HDF5 program.")
+ endif()
else()
execute_process(
COMMAND ${HDF5_${language}_COMPILER_EXECUTABLE} -show ${lib_type_args} "${_HDF5_TEST_SRC}"
@@ -368,9 +372,13 @@ function( _HDF5_invoke_compiler language output_var return_value_var version_var
RESULT_VARIABLE return_value
OUTPUT_STRIP_TRAILING_WHITESPACE
)
- if(return_value AND NOT HDF5_FIND_QUIETLY)
- message(STATUS
- "Unable to determine HDF5 ${language} flags from HDF5 wrapper.")
+ if(NOT return_value EQUAL 0)
+ message(CONFIGURE_LOG
+ "Unable to determine HDF5 ${language} flags from HDF5 wrapper.\n\n${output}")
+ if(NOT HDF5_FIND_QUIETLY)
+ message(STATUS
+ "Unable to determine HDF5 ${language} flags from HDF5 wrapper.")
+ endif()
endif()
execute_process(
COMMAND ${HDF5_${language}_COMPILER_EXECUTABLE} -showconfig
@@ -379,9 +387,13 @@ function( _HDF5_invoke_compiler language output_var return_value_var version_var
RESULT_VARIABLE return_value
OUTPUT_STRIP_TRAILING_WHITESPACE
)
- if(return_value AND NOT HDF5_FIND_QUIETLY)
- message(STATUS
- "Unable to determine HDF5 ${language} version_var from HDF5 wrapper.")
+ if(NOT return_value EQUAL 0)
+ message(CONFIGURE_LOG
+ "Unable to determine HDF5 ${language} version_var from HDF5 wrapper.\n\n${output}")
+ if(NOT HDF5_FIND_QUIETLY)
+ message(STATUS
+ "Unable to determine HDF5 ${language} version_var from HDF5 wrapper.")
+ endif()
endif()
string(REGEX MATCH "HDF5 Version: ([a-zA-Z0-9\\.\\-]*)" version "${config_output}")
if(version)