1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 19:08:07 +08:00

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.
This commit is contained in:
Ben Boeckel
2021-01-20 14:04:25 -05:00
parent 2c0e4c3762
commit 2439a048b0

View File

@@ -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)