From: Romain Forlot Date: Tue, 9 May 2017 11:17:16 +0000 (+0200) Subject: Rework dependencies about custom target to be more CMake compliant X-Git-Tag: 3.99.1~17 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=741d3a45300756c98efce668fa3a5ef9e6b95ec9;p=apps%2Fapp-templates.git Rework dependencies about custom target to be more CMake compliant CMake dependencies about custom target is to added with add_dependencies() DEPENDS options is more for output file dependencies. Change-Id: I3fb6b17e0de97bbb495471d50562d41f6ab549f0 Signed-off-by: Romain Forlot --- diff --git a/reference/etc/macros.cmake b/reference/etc/macros.cmake index b89094a..210ed91 100644 --- a/reference/etc/macros.cmake +++ b/reference/etc/macros.cmake @@ -243,13 +243,14 @@ if(EXTRA_DEPENDENCIES_ORDER) ) endif() -# Print developer helper message when everything is done +# Print developer helper message when build is done # ------------------------------------------------------- macro(project_closing_msg) if(CLOSING_MESSAGE AND GLOBAL_TARGET_LIST) - add_custom_target(${PROJECT_NAME}_done ALL - DEPENDS ${DEPENDENCIES_TARGET} ${GLOBAL_TARGET_LIST} + add_custom_target(${PROJECT_NAME}_build_done ALL COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "++ ${CLOSING_MESSAGE}" ) + add_dependencies(${PROJECT_NAME}_build_done + ${DEPENDENCIES_TARGET} ${GLOBAL_TARGET_LIST}) endif() endmacro()