Files
CMake/Tests/RunCMake/execute_process/Encoding-common.cmake
Brad King e1fc4b9b17 Tests/RunCMake/execute_process: Add test for ENCODING AUTO
On Windows the AUTO encoding is based on the console code page,
so run the test in an isolated console window.
2024-09-13 08:19:32 -04:00

12 lines
317 B
CMake

if(ENCODING)
set(maybe_ENCODING ENCODING ${ENCODING})
else()
set(maybe_ENCODING "")
set(ENCODING AUTO) # execute_process's default ENCODING
endif()
execute_process(
COMMAND ${TEST_ENCODING_EXE} ${ENCODING} ${CMAKE_CURRENT_LIST_DIR}/Encoding${ENCODING}-stderr.txt
OUTPUT_VARIABLE out
${maybe_ENCODING}
)