CMake run custom command after target fails to build

浪子不回头ぞ 提交于 2021-01-27 04:41:05

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!