mirror of
https://github.com/Kitware/CMake.git
synced 2026-06-24 08:47:59 +00:00
Modules: Tolerate CMAKE_EXECUTE_PROCESS_COMMAND_ERROR_IS_FATAL
Capture `execute_process` calls' `RESULT_VARIABLE`. We don't actually need to check the result as we presume the existing logic is already adequate, and sometimes programs return non-zero values as result of valid query. I.e. this is a "safe" way to broadly protect these scripts. Issue: #27782
This commit is contained in:
@@ -483,7 +483,10 @@ extern \"C\" {
|
||||
file(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n")
|
||||
|
||||
# with configure_file() cmake complains that you may not use a file created using file(WRITE) as input file for configure_file()
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${_filenameTmp}" "${_filename}"
|
||||
OUTPUT_QUIET ERROR_QUIET
|
||||
RESULT_VARIABLE _result_copy)
|
||||
|
||||
endfunction()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user