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

Brad King brad.king at kitware.com
Fri Aug 14 15:46:40 EDT 2015


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