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

Method GetCSharpSourceProperties

Source/cmVisualStudio10TargetGenerator.cxx:5994–6014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5992}
5993
5994void cmVisualStudio10TargetGenerator::GetCSharpSourceProperties(
5995 cmSourceFile const* sf, std::map<std::string, std::string>& tags)
5996{
5997 if (this->ProjectType == VsProjectType::csproj) {
5998 cmPropertyMap const& props = sf->GetProperties();
5999 for (std::string const& p : props.GetKeys()) {
6000 static cm::string_view const propNamePrefix = "VS_CSHARP_";
6001 if (cmHasPrefix(p, propNamePrefix)) {
6002 std::string tagName = p.substr(propNamePrefix.length());
6003 if (!tagName.empty()) {
6004 cmValue val = props.GetPropertyValue(p);
6005 if (cmNonempty(val)) {
6006 tags[tagName] = *val;
6007 } else {
6008 tags.erase(tagName);
6009 }
6010 }
6011 }
6012 }
6013 }
6014}
6015
6016void cmVisualStudio10TargetGenerator::WriteCSharpSourceProperties(
6017 Elem& e2, std::map<std::string, std::string> const& tags)

Callers 2

WriteExtraSourceMethod · 0.95

Calls 8

cmHasPrefixFunction · 0.85
cmNonemptyFunction · 0.85
GetKeysMethod · 0.80
lengthMethod · 0.80
GetPropertyValueMethod · 0.80
eraseMethod · 0.80
substrMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected