I have a CMake script that creates a command string and runs it with execute_process. But, some of the parameters are not getting filled in properly. Is there a way to print the actual command string that is getting executed?
There is a message call just above it which shows what the command should be but when I run that string on the command line, it works fine while the CMake execute_process fails.
Starting from CMake 3.15, execute_process has a COMMAND_ECHO <where> parameter, and there is also the CMAKE_EXECUTE_PROCESS_COMMAND_ECHO variable to set a default behaviour:
COMMAND_ECHO <where>New in version 3.15.
The command being run will be echo'ed to
<where>with<where>being set to one ofSTDERR,STDOUTorNONE. See theCMAKE_EXECUTE_PROCESS_COMMAND_ECHOvariable for a way to control the default behavior when this option is not present.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With