diff --git a/ament_cmake_gen_version_h/cmake/ament_generate_version_header.cmake b/ament_cmake_gen_version_h/cmake/ament_generate_version_header.cmake index d9470b40..5d2a2795 100644 --- a/ament_cmake_gen_version_h/cmake/ament_generate_version_header.cmake +++ b/ament_cmake_gen_version_h/cmake/ament_generate_version_header.cmake @@ -147,7 +147,7 @@ function(ament_generate_version_header target) "${SCRIPT_TEMPLATE_FILE}" COMMENT "Generating ${ARG_HEADER_PATH}") - add_custom_target("ament_generate_version_header__${target}" + add_custom_target("ament_generate_version_header__${target}" ALL DEPENDS "${GENERATED_HEADER_FILE}") add_dependencies("${target}" "ament_generate_version_header__${target}")