[cmake-developers] Recursion in OUTPUT_NAME genex (was: Generator expressions for <archive|library|runtime> output directory)

Robert Goulet Robert.Goulet at autodesk.com
Fri Aug 14 16:35:58 EDT 2015


Here is the patch for OUTPUT_NAME genex recursion issue.

I took the decision to send you the patch using mutable map, in order to reduce the number of changes and focus on the actual fix.
Cheers!

-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com] 
Sent: Friday, August 14, 2015 3:47 PM
To: Stephen Kelly <steveire at gmail.com>
Cc: Robert Goulet <Robert.Goulet at autodesk.com>; cmake-developers at cmake.org
Subject: Re: Recursion in OUTPUT_NAME genex (was: Generator expressions for <archive|library|runtime> output directory)

Steve,

Robert Goulet (in Cc) is working on detecting recursion in GetOutputName.
Recent refactoring moved this from cmTarget to cmGeneratorTarget, leading to this question:

On 08/14/2015 03:28 PM, Robert Goulet wrote:
> I got a patch working for the OUTPUT_NAME genex recursion problem, 
> however I'm not sure where to store the map. The function 
> GetOutputName is const, so I can't change the map if it's stored in 
> the cmGeneratorTarget class, unless I remove a bunch of const from 
> many functions, which is not ideal. Any suggestion as to where I 
> should store the map? Should we introduce an "internal" pointer like 
> in cmTarget class?

We'd like to store a map for this information much like cmTarget does for GetOutputInfo.

Should we just make GetOutputName non-const, store a mutable map (since it is for memoization), add an "internal" object, or something else?

Thanks,
-Brad

-------------- next part --------------
A non-text attachment was scrubbed...
Name: output-name-genex-recursion-fix.patch
Type: application/octet-stream
Size: 4295 bytes
Desc: output-name-genex-recursion-fix.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150814/a8bf91c0/attachment.obj>


More information about the cmake-developers mailing list