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

Method FindFlagTable

Source/cmGlobalVisualStudio10Generator.cxx:1435–1459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1433}
1434
1435cm::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
1461cmIDEFlagTable const* cmGlobalVisualStudio10Generator::LoadFlagTable(
1462 std::string const& toolSpecificName, std::string const& defaultName,

Callers 1

LoadFlagTableMethod · 0.95

Calls 3

cmStrCatFunction · 0.70
FileExistsFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected