mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-03 05:08:47 -06:00
Make internal TARGET_PROPERTY generator expressions more robust
While collecting usage requirements from the `INTERFACE_*` properties of directly linked targets, we internally generate `TARGET_PROPERTY:` and `TARGET_OBJECTS:` generator expressions to refer to those properties on those targets. At the point we generate these expressions we already have a pointer to an exact `cmGeneratorTarget` instance. Switch from using the target name in these generator expressions to using an internal unique name generated for each `cmGeneratorTarget` instance to be referenced. This avoids depending on the user-facing target name to find the same target we already have.
This commit is contained in:
@@ -303,6 +303,10 @@ public:
|
||||
void IndexTarget(cmTarget* t);
|
||||
void IndexGeneratorTarget(cmGeneratorTarget* gt);
|
||||
|
||||
// Index the target using a name that is unique to that target
|
||||
// even if other targets have the same name.
|
||||
std::string IndexGeneratorTargetUniquely(cmGeneratorTarget const* gt);
|
||||
|
||||
static bool IsReservedTarget(std::string const& name);
|
||||
|
||||
virtual const char* GetAllTargetName() const { return "ALL_BUILD"; }
|
||||
|
||||
Reference in New Issue
Block a user