mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-17 12:11:36 -06:00
The `CreateProcessW` documentation states "to run a batch file, you must start the command interpreter". Use `cmd /c the.bat` to run batch files. Also, use a "short path" to the `.bat` file if needed to avoid spaces. Previously this worked in some cases only due to undocumented behavior of `CreateProcessW` when given a `.bat` file. Fixes: #26655
9 lines
688 B
CMake
9 lines
688 B
CMake
execute_process(COMMAND "${CMAKE_CURRENT_LIST_DIR}/with space.bat" arg1 arg2)
|
|
execute_process(COMMAND "${CMAKE_CURRENT_LIST_DIR}/with space.Bat" "arg1 space" arg2)
|
|
execute_process(COMMAND "${CMAKE_CURRENT_LIST_DIR}/with space.bAT" arg1 "arg2 space")
|
|
execute_process(COMMAND "${CMAKE_CURRENT_LIST_DIR}/with space.BAT" "arg1 space" "arg2 space")
|
|
execute_process(COMMAND "${CMAKE_CURRENT_LIST_DIR}/with space.cmd" arg1 arg2)
|
|
execute_process(COMMAND "${CMAKE_CURRENT_LIST_DIR}/with space.Cmd" "arg1 space" arg2)
|
|
execute_process(COMMAND "${CMAKE_CURRENT_LIST_DIR}/with space.cMD" arg1 "arg2 space")
|
|
execute_process(COMMAND "${CMAKE_CURRENT_LIST_DIR}/with space.CMD" "arg1 space" "arg2 space")
|