Is there a CMake variable to check if building was necessary or there we no changes? - Stack Overflow

admin2025-04-16  4

Specifically I want to run a command before and after compilation. I managed to do that with a custom target my project depends on and a add_custom_command(TARGET project POST_BUILD ...) for the second call. However if there is nothing to build, that POST_BUILD command isn't triggered - which is something I need to catch. Any way to do that?

转载请注明原文地址:http://anycun.com/QandA/1744805521a87866.html