ExternalProject: Avoid bleed-through output when logging.
Unset VS_UNICODE_OUTPUT when executing a command whose output is being logged to a file. Previously, running Microsoft tools in sub-processes of Visual Studio would send their output to the Visual Studio output pipe named by this environment variable. Unsetting it forces the output back to the normal stdout and stderr channels where cmake can intercept it and direct it to the appropriate log files.
This commit is contained in:
parent
63d21c1f8e
commit
44aff73d4a
|
@ -711,7 +711,7 @@ endif()
|
||||||
set(sep ";")
|
set(sep ";")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
set(code "${code}set(command \"${cmd}\")${code_execute_process}")
|
set(code "set(ENV{VS_UNICODE_OUTPUT} \"\")\n${code}set(command \"${cmd}\")${code_execute_process}")
|
||||||
file(WRITE ${stamp_dir}/${name}-${step}-impl.cmake "${code}")
|
file(WRITE ${stamp_dir}/${name}-${step}-impl.cmake "${code}")
|
||||||
set(command ${CMAKE_COMMAND} "-Dmake=\${make}" "-Dconfig=\${config}" -P ${stamp_dir}/${name}-${step}-impl.cmake)
|
set(command ${CMAKE_COMMAND} "-Dmake=\${make}" "-Dconfig=\${config}" -P ${stamp_dir}/${name}-${step}-impl.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
@ -721,6 +721,7 @@ endif()
|
||||||
set(logbase ${stamp_dir}/${name}-${step})
|
set(logbase ${stamp_dir}/${name}-${step})
|
||||||
file(WRITE ${script} "
|
file(WRITE ${script} "
|
||||||
${code_cygpath_make}
|
${code_cygpath_make}
|
||||||
|
set(ENV{VS_UNICODE_OUTPUT} \"\")
|
||||||
set(command \"${command}\")
|
set(command \"${command}\")
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND \${command}
|
COMMAND \${command}
|
||||||
|
|
Loading…
Reference in New Issue