summaryrefslogtreecommitdiff
path: root/Modules/FindHDF5.cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2021-01-20 14:04:25 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2021-01-20 14:04:25 -0500
commit2439a048b0b98b654d6b4a68146eb65283c575e8 (patch)
treeda464d8cc5b165254ece5e9ba863f3324e7c5ae9 /Modules/FindHDF5.cmake
parent2c0e4c37624e673a6d513cffc8edb1d595d175a9 (diff)
downloadcmake-2439a048b0b98b654d6b4a68146eb65283c575e8.tar.gz
FindHDF5: avoid writing to the output when testing h5cc
The execution of this tool can output error logs to the output during configure. This can then be caught by CTest and flagged as an error during the build.
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r--Modules/FindHDF5.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 25f5a1f0a5..6bbc82171e 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -360,6 +360,8 @@ function( _HDF5_invoke_compiler language output_var return_value_var version_var
execute_process(
COMMAND ${HDF5_${language}_COMPILER_EXECUTABLE} ${test_file}
WORKING_DIRECTORY ${scratch_dir}
+ OUTPUT_VARIABLE output
+ ERROR_VARIABLE output
RESULT_VARIABLE return_value
)
if(return_value)