[cmake-developers] Alternate if() without implicit variable expansion

Nils Gladitz nilsgladitz at gmail.com
Thu Sep 4 11:58:08 EDT 2014


On 09/04/2014 05:53 PM, Brad King wrote:
> Most commands just implement InitialPass, which gets the expanded
> arguments.  Some implement InvokeInitialPass which gets the args
> before expansion.  The cmIfCommand does this already, and its
> call to cmMakefile::ExpandArguments could be updated to request
> the additional information.  Other commands should not need to
> be modified.
>
> The cmMakefile::ExpandArguments method's output will have to provide
> the information.  I'm not sure whether all call sites need it or not,
> but it could simply be implemented as a second argument of type
> "vector<cmListFileArgument::Delimiter>* = 0" to be populated with
> the same number of entries as the original argument.  Or, a second
> signature of vector<CommandArg> could be created to pair each output
> argument string with its delimiter type.  Then cmIfCommand could use
> that internally.


Thanks, that actually sounds doable.

I'll give it a try.

Nils



More information about the cmake-developers mailing list