[cmake-developers] Generator expressions for <archive|library|runtime> output directory

Robert Goulet Robert.Goulet at autodesk.com
Tue Aug 11 13:51:29 EDT 2015


Here's the updated patch for OUTPUT_DIRECTORY supporting genex.

- I fixed the recursion crash issue you mentioned by using the empty entry in the map, as you suggested.
- I also implemented your suggestion that we should skip adding the config suffix when using OUTPUT_DIRECTORY without config name.
- I kept the genex support for the OUTPUT_DIRECTORY_<CONFIG> property because I think we might want to use genex for specific configurations as opposed to all of them? Does that make sense?

Let me know if that's good to go, then I will fix the crash with OUTPUT_NAME in the next patch.
Thanks!


-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com] 
Sent: Monday, August 10, 2015 11:48 AM
To: Robert Goulet <Robert.Goulet at autodesk.com>
Cc: cmake-developers at cmake.org
Subject: Re: [cmake-developers] Generator expressions for <archive|library|runtime> output directory

On 08/10/2015 11:29 AM, Robert Goulet wrote:
> could it be a problem of recursion?

Yes, that is exactly the problem.

> perhaps it would be better to check for recursion directly in the 
> generator expressions evaluation

Some generator expressions do support recursion.  While some checks may be useful there, I do not think that is the right place to solve this particular problem.

The basic cmTarget methods that compute the output directory and name need to check for recursion themselves and at least not crash on it.  I explained the needed refactoring a few messages back in this thread.  This will ensure that other future changes do not find another way to introduce recursion.

Thanks,
-Brad

-------------- next part --------------
A non-text attachment was scrubbed...
Name: output-dir-genex.patch
Type: application/octet-stream
Size: 11920 bytes
Desc: output-dir-genex.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150811/330c0a7d/attachment.obj>


More information about the cmake-developers mailing list