execute_process: Incorrect WORKING_DIRECTORY doesn't cause errors on windows
If running a process like this,
execute_process(COMMAND dir
WORKING_DIRECTORY "d:/non/existent/path"
RESULT_VARIABLE exec_res)
message("exec_res ${exec_res}")
it clearly signals an error on unix platforms as it's unable to switch to the specified working directory, but on windows, it just ignores the working directory request if it's missing and proceeds in whatever directory it happened to be in before.
Edited by Brad King