Tests/RunCMake/execute_process/Encoding-common.cmake
raw| 1 | if(ENCODING) |
| 2 | set(maybe_ENCODING ENCODING ${ENCODING}) |
| 3 | else() |
| 4 | set(maybe_ENCODING "") |
| 5 | cmake_policy(GET CMP0176 cmp0176) |
| 6 | if(cmp0176 STREQUAL "NEW") |
| 7 | set(ENCODING UTF-8) # execute_process's default ENCODING |
| 8 | else() |
| 9 | set(ENCODING AUTO) # execute_process's default ENCODING |
| 10 | endif() |
| 11 | endif() |
| 12 | execute_process( |
| 13 | COMMAND ${TEST_ENCODING_EXE} ${ENCODING} ${CMAKE_CURRENT_LIST_DIR}/Encoding${ENCODING}-stderr.txt |
| 14 | OUTPUT_VARIABLE out |
| 15 | ${maybe_ENCODING} |
| 16 | ) |