MCPcopy Create free account
hub / github.com/Kitware/CMake / TargetLinkOptionsImpl

Class TargetLinkOptionsImpl

Source/cmTargetLinkOptionsCommand.cxx:15–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace {
14
15class TargetLinkOptionsImpl : public cmTargetPropCommandBase
16{
17public:
18 using cmTargetPropCommandBase::cmTargetPropCommandBase;
19
20private:
21 void HandleMissingTarget(std::string const& name) override
22 {
23 this->Makefile->IssueMessage(
24 MessageType::FATAL_ERROR,
25 cmStrCat("Cannot specify link options for target \"", name,
26 "\" which is not built by this project."));
27 }
28
29 bool HandleDirectContent(cmTarget* tgt,
30 std::vector<std::string> const& content,
31 bool prepend, bool /*system*/) override
32 {
33 cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
34 tgt->InsertLinkOption(BT<std::string>(this->Join(content), lfbt), prepend);
35 return true; // Successfully handled.
36 }
37
38 std::string Join(std::vector<std::string> const& content) override
39 {
40 return cmList::to_string(content);
41 }
42};
43
44} // namespace
45

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…