[cmake-developers] Generator expressions for output directory/name (and install?)

Brad King brad.king at kitware.com
Tue Jun 16 10:21:13 EDT 2015


On 06/15/2015 03:03 PM, Robert Goulet wrote:
> Updated with improved tests and added docs.

Thanks.  Here are more comments.

Please split the patch to do the OUTPUT_NAME/dir changes first.
Update the Tests/PerConfig test to cover these.  Since the
RUNTIME_OUTPUT_DIRECTORY properties are learning this, please
do it for ARCHIVE_OUTPUT_DIRECTORY and LIBRARY_OUTPUT_DIRECTORY
too for completeness.

Then do the install DESTINATION changes in a second patch.
That will simplify review.

In this hunk:

>    cmInstallTargetGenerator(
> -    cmTarget& t, const char* dest, bool implib,
> +    cmMakefile* mf, cmTarget& t, const char* dest, bool implib,

The cmTarget has a GetMakefile() method so there should be no
need to pass the mf separately.

In this hunk:

> @@ -216,6 +216,7 @@ void cmScriptGenerator::GenerateScriptActionsPerConfig(std::ostream& os,
>          i != this->ConfigurationTypes->end(); ++i)
>        {
>        const char* config = i->c_str();
> +      this->ConfigurationName = config;
>        if(this->GeneratesForConfig(config))
>          {
>          // Generate a per-configuration block.

This should not be needed if things are factored correctly.
Everything in that block already passes "config" through
as a parameter.

Thanks,
-Brad



More information about the cmake-developers mailing list