summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkItem.h
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-11-18 04:04:35 (GMT)
committerBrad King <brad.king@kitware.com>2023-11-23 19:26:31 (GMT)
commit1175f1c874a7cd34d643902bc428df92bce3471a (patch)
tree58011c63b67ff637e27fe212e1447a9116f0288c /Source/cmLinkItem.h
parentd2fa56772f290c61925a70161c77be5f4334fd77 (diff)
downloadCMake-1175f1c874a7cd34d643902bc428df92bce3471a.zip
CMake-1175f1c874a7cd34d643902bc428df92bce3471a.tar.gz
CMake-1175f1c874a7cd34d643902bc428df92bce3471a.tar.bz2
LinkItem: track `cmSourceFile` instances for external objects
The target may be required in order to provide Fortran modules, so track the source file so that the target may be looked up when needed.
Diffstat (limited to 'Source/cmLinkItem.h')
-rw-r--r--Source/cmLinkItem.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmLinkItem.h b/Source/cmLinkItem.h
index 262728b..e4444d3 100644
--- a/Source/cmLinkItem.h
+++ b/Source/cmLinkItem.h
@@ -17,6 +17,7 @@
#include "cmTargetLinkLibraryType.h"
class cmGeneratorTarget;
+class cmSourceFile;
// Basic information about each link item.
class cmLinkItem
@@ -29,6 +30,9 @@ public:
cmLinkItem(cmGeneratorTarget const* t, bool c, cmListFileBacktrace bt);
std::string const& AsStr() const;
cmGeneratorTarget const* Target = nullptr;
+ // The source file representing the external object (used when linking
+ // `$<TARGET_OBJECTS>`)
+ cmSourceFile const* ObjectSource = nullptr;
bool Cross = false;
cmListFileBacktrace Backtrace;
friend bool operator<(cmLinkItem const& l, cmLinkItem const& r);