[cmake-developers] AddCustomCommandWithConfig

Brad King brad.king at kitware.com
Wed Feb 12 13:05:08 EST 2014


On 02/12/2014 08:40 AM, Brad King wrote:
> On 02/12/2014 04:15 AM, Stephen Kelly wrote:
>> I haven't looked thoroughly, but how much does dependency 
>> specification/handling need to change? The dependency of a command on a set 
>> of targets should now be config-specific, right?
> 
> I haven't read through the topic yet but IIRC we discussed the
> per-config dependency problem before and concluded that we should
> use the union of dependencies across all configs

Indeed, cmTargetTraceDependencies::CheckCustomCommand needs to be
modified to consider dependencies added by per-config custom commands.

This hunk:

-  /** Get the list of command lines.  */
-  const cmCustomCommandLines& GetCommandLines() const;
+  /** Get the list of command lines for the configuration. */
+  const cmCustomCommandLines&
+    GetCommandLines(const std::string& configName = "") const;

should be rewritten without the default value for configName.
That will expose all call sites that need to be updated, including
cmTargetTraceDependencies.

-Brad




More information about the cmake-developers mailing list