问题
I know how to run a command after (or before) building a target with add_custom_command :
add_custom_command(TARGET my_target POST_BUILD
COMMAND echo "custom command"
)
But I want to ALWAYS run this command, after the target has been build or after it failed to build.
Here, when the target fails to build, the command is not launched.
Is it possible to achieve this with cmake?
来源:https://stackoverflow.com/questions/39076385/cmake-run-custom-command-after-target-fails-to-build