diff options
author | Brad King <brad.king@kitware.com> | 2021-05-29 12:26:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-05-29 13:28:36 (GMT) |
commit | f530b3a26729d0820c804e312b72e0061d6eeb4b (patch) | |
tree | e2c37973e6a2c1bb3d13fcb3983a1aafff5f7837 /Source/cmComputeLinkInformation.h | |
parent | 8a4ca110e49c64c4892a37ffe08a91a5a5219acf (diff) | |
download | CMake-f530b3a26729d0820c804e312b72e0061d6eeb4b.zip CMake-f530b3a26729d0820c804e312b72e0061d6eeb4b.tar.gz CMake-f530b3a26729d0820c804e312b72e0061d6eeb4b.tar.bz2 |
OpenWatcom: Add infrastructure to link to object files
Diffstat (limited to 'Source/cmComputeLinkInformation.h')
-rw-r--r-- | Source/cmComputeLinkInformation.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h index 9afa0eb..7fe30b3 100644 --- a/Source/cmComputeLinkInformation.h +++ b/Source/cmComputeLinkInformation.h @@ -41,18 +41,27 @@ public: Yes, }; + enum class ItemIsObject + { + No, + Yes, + }; + struct Item { Item() = default; Item(BT<std::string> v, ItemIsPath isPath, + ItemIsObject isObject = ItemIsObject::No, cmGeneratorTarget const* target = nullptr) : Value(std::move(v)) , IsPath(isPath) + , IsObject(isObject) , Target(target) { } BT<std::string> Value; ItemIsPath IsPath = ItemIsPath::Yes; + ItemIsObject IsObject = ItemIsObject::No; cmGeneratorTarget const* Target = nullptr; }; using ItemVector = std::vector<Item>; @@ -81,6 +90,11 @@ public: return this->LibLinkFileFlag; } + std::string const& GetObjLinkFileFlag() const + { + return this->ObjLinkFileFlag; + } + std::string const& GetRPathLinkFlag() const { return this->RPathLinkFlag; } std::string GetRPathLinkString() const; @@ -89,7 +103,8 @@ public: const cmGeneratorTarget* GetTarget() { return this->Target; } private: - void AddItem(BT<std::string> const& item, const cmGeneratorTarget* tgt); + void AddItem(BT<std::string> const& item, const cmGeneratorTarget* tgt, + ItemIsObject isObject = ItemIsObject::No); void AddSharedDepItem(BT<std::string> const& item, cmGeneratorTarget const* tgt); void AddRuntimeDLL(cmGeneratorTarget const* tgt); @@ -125,6 +140,7 @@ private: const char* LoaderFlag; std::string LibLinkFlag; std::string LibLinkFileFlag; + std::string ObjLinkFileFlag; std::string LibLinkSuffix; std::string RuntimeFlag; std::string RuntimeSep; @@ -166,7 +182,7 @@ private: // Handling of link items. void AddTargetItem(BT<std::string> const& item, const cmGeneratorTarget* target); - void AddFullItem(BT<std::string> const& item); + void AddFullItem(BT<std::string> const& item, ItemIsObject isObject); bool CheckImplicitDirItem(std::string const& item); void AddUserItem(BT<std::string> const& item, bool pathNotKnown); void AddFrameworkItem(std::string const& item); |