| 12 | namespace { |
| 13 | |
| 14 | class TargetCompileFeaturesImpl : public cmTargetPropCommandBase |
| 15 | { |
| 16 | public: |
| 17 | using cmTargetPropCommandBase::cmTargetPropCommandBase; |
| 18 | |
| 19 | private: |
| 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 |
no outgoing calls
no test coverage detected
searching dependent graphs…