[cmake-developers] Silent failure of attaching custom commands to non existing target

Brad King brad.king at kitware.com
Tue Nov 19 12:34:16 EST 2013


On 11/19/2013 11:48 AM, Nils Gladitz wrote:
> Would anyone be opposed to having cmMakefile::AddCustomCommandToTarget()
> throw an error in case the target does not exist?
> 
> Currently this just silently fails without any diagnostics.
> 
> I assume this wouldn't need a policy since there is no useful behavior 
> here to preserve?

We would need a policy because existing project releases inevitably
contain such code by accident need to continue to work, albeit with
a policy warning.

-Brad



More information about the cmake-developers mailing list