| 1433 | } |
| 1434 | |
| 1435 | cm::optional<std::string> cmGlobalVisualStudio10Generator::FindFlagTable( |
| 1436 | cm::string_view toolsetName, cm::string_view table) const |
| 1437 | { |
| 1438 | if (!this->CustomFlagTableDir.empty()) { |
| 1439 | std::string customFlagTableFile = |
| 1440 | cmStrCat(this->CustomFlagTableDir, '/', this->GetPlatformName(), '_', |
| 1441 | toolsetName, '_', table, ".json"); |
| 1442 | if (cmSystemTools::FileExists(customFlagTableFile)) { |
| 1443 | return customFlagTableFile; |
| 1444 | } |
| 1445 | customFlagTableFile = |
| 1446 | cmStrCat(this->CustomFlagTableDir, '/', this->GetPlatformName(), '_', |
| 1447 | table, ".json"); |
| 1448 | if (cmSystemTools::FileExists(customFlagTableFile)) { |
| 1449 | return customFlagTableFile; |
| 1450 | } |
| 1451 | } |
| 1452 | std::string fullPath = |
| 1453 | cmStrCat(cmSystemTools::GetCMakeRoot(), "/Templates/MSBuild/FlagTables/", |
| 1454 | toolsetName, '_', table, ".json"); |
| 1455 | if (cmSystemTools::FileExists(fullPath)) { |
| 1456 | return fullPath; |
| 1457 | } |
| 1458 | return {}; |
| 1459 | } |
| 1460 | |
| 1461 | cmIDEFlagTable const* cmGlobalVisualStudio10Generator::LoadFlagTable( |
| 1462 | std::string const& toolSpecificName, std::string const& defaultName, |
no test coverage detected