| 806 | } |
| 807 | |
| 808 | static void importPropertyGroup(const tinyxml2::XMLElement *node, std::map<std::string, std::string, cppcheck::stricmp> &variables, std::string &includePath) |
| 809 | { |
| 810 | const char* labelAttribute = node->Attribute("Label"); |
| 811 | if (labelAttribute && std::strcmp(labelAttribute, "UserMacros") == 0) { |
| 812 | for (const tinyxml2::XMLElement *propertyGroup = node->FirstChildElement(); propertyGroup; propertyGroup = propertyGroup->NextSiblingElement()) { |
| 813 | const char* name = propertyGroup->Name(); |
| 814 | const char *text = empty_if_null(propertyGroup->GetText()); |
| 815 | variables[name] = text; |
| 816 | } |
| 817 | |
| 818 | } else if (!labelAttribute) { |
| 819 | for (const tinyxml2::XMLElement *propertyGroup = node->FirstChildElement(); propertyGroup; propertyGroup = propertyGroup->NextSiblingElement()) { |
| 820 | if (std::strcmp(propertyGroup->Name(), "IncludePath") != 0) |
| 821 | continue; |
| 822 | const char *text = propertyGroup->GetText(); |
| 823 | if (!text) |
| 824 | continue; |
| 825 | std::string path(text); |
| 826 | const std::string::size_type pos = path.find("$(IncludePath)"); |
| 827 | if (pos != std::string::npos) |
| 828 | path.replace(pos, 14U, includePath); |
| 829 | includePath = std::move(path); |
| 830 | } |
| 831 | } |
| 832 | } |
| 833 | |
| 834 | static void loadVisualStudioProperties(const std::string &props, std::map<std::string,std::string,cppcheck::stricmp> &variables, std::string &includePath, const std::string &additionalIncludeDirectories, std::list<ItemDefinitionGroup> &itemDefinitionGroupList) |
| 835 | { |
no test coverage detected