I am doing this:
add_custom_target(Target1
COMMAND Command1
)
add_custom_target(Target2
COMMAND Command2
)
add_dependencies(Target2 Target1)
but if Command1
has a non-zero exit code, Command2
is never run. Is there a way to make sure that Target2
runs after Target1
, but no matter what the exit code of Command1
is?