[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 15:59:25 EDT 2015


You made me realize that other members of that class are simply using mutable keyword. This would make the change less risky and smaller in scope. Perhaps it would be best to just follow this line and keep further refactoring for a different patch?

-----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



More information about the cmake-developers mailing list