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

Robert Goulet Robert.Goulet at autodesk.com
Fri Jun 12 10:19:24 EDT 2015


Here's the updated patch file with tests added. Let me know if it's good to go.

-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com] 
Sent: Thursday, June 11, 2015 8:55 AM
To: Robert Goulet
Cc: cmake-developers at cmake.org
Subject: Re: [cmake-developers] Generator expressions for output directory/name (and install?)

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: more-generator-expressions.patch
Type: application/octet-stream
Size: 29547 bytes
Desc: more-generator-expressions.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150612/5a2d5706/attachment-0001.obj>


More information about the cmake-developers mailing list