| 152 | |
| 153 | template <typename PropertyType> |
| 154 | void checkPropertyConsistency(cmGeneratorTarget const* depender, |
| 155 | cmGeneratorTarget const* dependee, |
| 156 | std::string const& propName, |
| 157 | std::set<std::string>& emitted, |
| 158 | std::string const& config, CompatibleType t, |
| 159 | PropertyType* /*unused*/) |
| 160 | { |
| 161 | cmValue prop = dependee->GetProperty(propName); |
| 162 | if (!prop) { |
| 163 | return; |
| 164 | } |
| 165 | |
| 166 | cmList props{ *prop }; |
| 167 | std::string pdir = |
| 168 | cmStrCat(cmSystemTools::GetCMakeRoot(), "/Help/prop_tgt/"); |
| 169 | |
| 170 | for (std::string const& p : props) { |
| 171 | std::string pname = cmSystemTools::HelpFileName(p); |
| 172 | std::string pfile = cmStrCat(pdir, pname, ".rst"); |
| 173 | if (cmSystemTools::FileExists(pfile, true)) { |
| 174 | std::ostringstream e; |
| 175 | e << "Target \"" << dependee->GetName() << "\" has property \"" << p |
| 176 | << "\" listed in its " << propName |
| 177 | << " property. " |
| 178 | "This is not allowed. Only user-defined properties may appear " |
| 179 | "listed in the " |
| 180 | << propName << " property."; |
| 181 | depender->GetLocalGenerator()->IssueMessage(MessageType::FATAL_ERROR, |
| 182 | e.str()); |
| 183 | return; |
| 184 | } |
| 185 | if (emitted.insert(p).second) { |
| 186 | getLinkInterfaceDependentProperty<PropertyType>(depender, p, config, t, |
| 187 | nullptr); |
| 188 | if (cmSystemTools::GetErrorOccurredFlag()) { |
| 189 | return; |
| 190 | } |
| 191 | } |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | namespace { |
| 196 | std::string intersect(std::set<std::string> const& s1, |
nothing calls this directly
no test coverage detected
searching dependent graphs…