see https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-conditions properties are .NET String objects and you can call any of its members on them
| 606 | // see https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-conditions |
| 607 | // properties are .NET String objects and you can call any of its members on them |
| 608 | bool conditionIsTrue(const ProjectConfiguration &p, const std::string &filename, std::vector<std::string> &errors) const { |
| 609 | if (mCondition.empty()) |
| 610 | return true; |
| 611 | try { |
| 612 | return evalCondition(mCondition, p); |
| 613 | } |
| 614 | catch (const std::runtime_error& r) |
| 615 | { |
| 616 | errors.emplace_back(filename + ": Can not evaluate condition '" + mCondition + "': " + r.what()); |
| 617 | return false; |
| 618 | } |
| 619 | } |
| 620 | |
| 621 | static bool evalCondition(const std::string& condition, const ProjectConfiguration &p) { |
| 622 | std::string c = '(' + condition + ")"; |