add_custom_command(OUTPUT "a" COMMAND "$<1:$>") add_custom_command(OUTPUT "b" COMMAND "$<1:$>") add_custom_target(drive DEPENDS "a" "b")