To print a message after creating a specific goal, e. d. make yourtarget you can use
add_custom_command(TARGET yourtarget POST_BUILD COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Message after yourtarget has been built.")
Instead of POST_BUILD you can also use PRE_BUILD or PRE_LINK for other purposes, see the documentation .
(You indicated in the comments that you want to print the message after all the goals, but the original question is less accurate. Therefore, it can be useful for people who look here.)
source share