diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-02-05 02:07:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-07 11:47:07 (GMT) |
commit | acbd69c219214ed2477e33d1bb0c7754513e03d5 (patch) | |
tree | b1e51d7bc250722fa14b99318a852c68999992c5 /Modules | |
parent | 6f23321d405930241fa431cfda7650f2993f0c19 (diff) | |
download | CMake-acbd69c219214ed2477e33d1bb0c7754513e03d5.zip CMake-acbd69c219214ed2477e33d1bb0c7754513e03d5.tar.gz CMake-acbd69c219214ed2477e33d1bb0c7754513e03d5.tar.bz2 |
FindHDF5: Use execute_process instead of exec_program
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindHDF5.cmake | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 2772b7d..ff464d7 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -322,20 +322,22 @@ macro( _HDF5_invoke_compiler language output return_value version is_parallel) elseif("${language}" STREQUAL "Fortran") set(test_file ${scratch_dir}/cmake_hdf5_test.f90) endif() - exec_program( ${HDF5_${language}_COMPILER_EXECUTABLE} - ARGS -show ${lib_type_args} ${test_file} - OUTPUT_VARIABLE ${output} - RETURN_VALUE ${return_value} - ) + execute_process( + COMMAND ${HDF5_${language}_COMPILER_EXECUTABLE} -show ${lib_type_args} ${test_file} + OUTPUT_VARIABLE ${output} + ERROR_VARIABLE ${output} + RESULT_VARIABLE ${return_value} + ) if(NOT ${${return_value}} EQUAL 0) message(STATUS "Unable to determine HDF5 ${language} flags from HDF5 wrapper.") endif() - exec_program( ${HDF5_${language}_COMPILER_EXECUTABLE} - ARGS -showconfig - OUTPUT_VARIABLE config_output - RETURN_VALUE config_return - ) + execute_process( + COMMAND ${HDF5_${language}_COMPILER_EXECUTABLE} -showconfig + OUTPUT_VARIABLE config_output + ERROR_VARIABLE config_output + RESULT_VARIABLE config_return + ) if(NOT ${return_value} EQUAL 0) message( STATUS "Unable to determine HDF5 ${language} version from HDF5 wrapper.") |