Debian Codegraph @

Tests/RunCMake/execute_process/EchoVariable.cmake

raw
1 execute_process(
2 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/EchoVariableOutput.cmake
3 OUTPUT_VARIABLE stdout
4 ERROR_QUIET
5 ECHO_OUTPUT_VARIABLE
6 )
7
8 file(READ ${CMAKE_CURRENT_LIST_DIR}/EchoVariable-stdout.txt expected_stdout)
9 if (NOT stdout MATCHES "${expected_stdout}")
10 message(FATAL_ERROR "stdout differs from the expected stdout")
11 endif()
12
13 execute_process(
14 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/EchoVariableOutput.cmake
15 ERROR_VARIABLE stderr
16 OUTPUT_QUIET
17 ECHO_ERROR_VARIABLE
18 )
19
20 file(READ ${CMAKE_CURRENT_LIST_DIR}/EchoVariable-stderr.txt expected_stderr)
21 if (NOT stderr MATCHES "${expected_stderr}")
22 message(FATAL_ERROR "stderr differs from the expected stderr")
23 endif()