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

Class TargetCompileFeaturesImpl

Source/cmTargetCompileFeaturesCommand.cxx:14–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12namespace {
13
14class TargetCompileFeaturesImpl : public cmTargetPropCommandBase
15{
16public:
17 using cmTargetPropCommandBase::cmTargetPropCommandBase;
18
19private:
20 void HandleMissingTarget(std::string const& name) override
21 {
22 this->Makefile->IssueMessage(
23 MessageType::FATAL_ERROR,
24 cmStrCat("Cannot specify compile features for target \"", name,
25 "\" which is not built by this project."));
26 }
27
28 bool HandleDirectContent(cmTarget* tgt,
29 std::vector<std::string> const& content,
30 bool /*prepend*/, bool /*system*/) override
31 {
32 cmStandardLevelResolver standardResolver(this->Makefile);
33 for (std::string const& it : content) {
34 std::string error;
35 if (!standardResolver.AddRequiredTargetFeature(tgt, it, &error)) {
36 this->SetError(error);
37 return false; // Not (successfully) handled.
38 }
39 }
40 return true; // Successfully handled.
41 }
42
43 std::string Join(std::vector<std::string> const& content) override
44 {
45 return cmList::to_string(content);
46 }
47};
48
49} // namespace
50

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…