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

Brad King brad.king at kitware.com
Thu Jun 11 08:54:31 EDT 2015


On 06/10/2015 01:43 PM, Robert Goulet wrote:
> Ok I think I got something nicely integrated now.

Thanks.  Here are some comments:

> +  std::string GetDestination(const char* config=nullptr) const;

Please avoid C++11 constructs.

> +std::string cmInstallGenerator::GetDestination(const char* config) const
> +{
> +  std::string configName = config ? config : ConfigurationName;

This should be able to use "std::string const&" as the argument type
instead.  Just have the call sites pass ConfigurationName themselves
or create an argument-less overload that passes it for them.

Also please look at updating the test suite to cover this.  The
Tests/ExportImport test has Export and Import sub-projects that
test installation of all kinds of targets.  That may be a good
place to add tests for DESTINATION.

Thanks,
-Brad



More information about the cmake-developers mailing list