summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-01-06 23:29:44 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-01-06 23:29:44 (GMT)
commit44aff73d4a7cb407633ab7afc8a76774d4f69e4f (patch)
tree06671e0d016062773d713e026856edcc3af5fe18 /Modules
parent63d21c1f8efeb2f2337221119c479d75bbb0b7c0 (diff)
downloadCMake-44aff73d4a7cb407633ab7afc8a76774d4f69e4f.zip
CMake-44aff73d4a7cb407633ab7afc8a76774d4f69e4f.tar.gz
CMake-44aff73d4a7cb407633ab7afc8a76774d4f69e4f.tar.bz2
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.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ExternalProject.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 997164a..9735eb4 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -711,7 +711,7 @@ endif()
set(sep ";")
endif()
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}")
set(command ${CMAKE_COMMAND} "-Dmake=\${make}" "-Dconfig=\${config}" -P ${stamp_dir}/${name}-${step}-impl.cmake)
endif()
@@ -721,6 +721,7 @@ endif()
set(logbase ${stamp_dir}/${name}-${step})
file(WRITE ${script} "
${code_cygpath_make}
+set(ENV{VS_UNICODE_OUTPUT} \"\")
set(command \"${command}\")
execute_process(
COMMAND \${command}