You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.7 KiB
42 lines
1.7 KiB
if(CHECK_ERROR_OUTPUT_LOCATION)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
|
"-- 1 COMMAND_ECHO " COMMAND_ECHO )
|
|
endif()
|
|
# test COMMAND_ECHO STDOUT
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
|
"-- 1 COMMAND_ECHO STDOUT" COMMAND_ECHO STDOUT )
|
|
# test COMMAND_ECHO STDERR
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
|
"-- 2 COMMAND_ECHO STDERR" COMMAND_ECHO STDERR )
|
|
# test CMAKE_EXECUTE_PROCESS_COMMAND_ECHO STDOUT
|
|
set(CMAKE_EXECUTE_PROCESS_COMMAND_ECHO STDOUT)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
|
"-- 3 COMMAND_ECHO STDOUT" )
|
|
# test CMAKE_EXECUTE_PROCESS_COMMAND_ECHO STDERR
|
|
set(CMAKE_EXECUTE_PROCESS_COMMAND_ECHO STDERR)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
|
"-- 4 COMMAND_ECHO STDERR" )
|
|
# make sure local will override global settings
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
|
"-- 5 COMMAND_ECHO STDOUT" COMMAND_ECHO STDOUT )
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
|
"-- 6 COMMAND_ECHO NONE" COMMAND_ECHO NONE)
|
|
# test both and make sure override works
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
|
"-- 7 COMMAND_ECHO STDERR COMMAND_ECHO STDOUT" COMMAND_ECHO STDERR
|
|
COMMAND_ECHO STDOUT)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
|
"-- 8 COMMAND_ECHO STDOUT COMMAND_ECHO STDERR" COMMAND_ECHO STDOUT
|
|
COMMAND_ECHO STDERR)
|
|
|
|
# check for bad arguments to global and local
|
|
if(CHECK_GLOBAL)
|
|
# make sure a non STDERR or STDOUT value is an error
|
|
set(CMAKE_EXECUTE_PROCESS_COMMAND_ECHO BAD)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
|
"-- 9 - 1 CMAKE_EXECUTE_PROCESS_COMMAND_ECHO BAD" )
|
|
else()
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E echo
|
|
"-- 9 - 2 COMMAND_ECHO BAD" COMMAND_ECHO BAD)
|
|
endif()
|