summaryrefslogtreecommitdiffstats
path: root/Modules/FindHDF5.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-27 17:58:51 (GMT)
committerBrad King <brad.king@kitware.com>2023-03-29 21:18:29 (GMT)
commitee075a53c883775e8753e0fe6ba240eba9dcaae6 (patch)
treeba0d129a8e76daa9b22892d16b53d7de98c8077f /Modules/FindHDF5.cmake
parent72915b10683cd7a6f1345f4e438722f12dcb1973 (diff)
downloadCMake-ee075a53c883775e8753e0fe6ba240eba9dcaae6.zip
CMake-ee075a53c883775e8753e0fe6ba240eba9dcaae6.tar.gz
CMake-ee075a53c883775e8753e0fe6ba240eba9dcaae6.tar.bz2
FindHDF5: Record compiler wrapper checks to configure log
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)