mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 06:30:20 -06:00
Since commit 0a0a0f8a74 (cmMessenger: Color messages to terminal by
type, 2021-05-18, v3.21.0-rc1~146^2) the message output no longer goes
through our custom streambuf on Windows that converts output encoding.
This can cause messages to be printed with the wrong encoding in a
Windows Console. It also causes messages to have a mix of LF and CRLF
newlines because `stderr` converts LF to CRLF but our custom streambuf
does not.
Revert to using just `cerr` for messages on Windows. Another approach
will be needed to achieve color output on Windows later.
Fixes: #22444
10 lines
295 B
CMake
10 lines
295 B
CMake
execute_process(
|
|
COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_LIST_DIR}/newline-script.cmake"
|
|
OUTPUT_FILE newline-script-stdout.txt
|
|
ERROR_FILE newline-script-stderr.txt
|
|
)
|
|
foreach(f out err)
|
|
file(READ newline-script-std${f}.txt hex HEX)
|
|
message(STATUS "${f}='${hex}'")
|
|
endforeach()
|