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

Method LoadFlagTable

Source/cmGlobalVisualStudio10Generator.cxx:1461–1505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1459}
1460
1461cmIDEFlagTable const* cmGlobalVisualStudio10Generator::LoadFlagTable(
1462 std::string const& toolSpecificName, std::string const& defaultName,
1463 std::string const& table) const
1464{
1465 cmMakefile* mf = this->GetCurrentMakefile();
1466
1467 std::string filename;
1468 if (!toolSpecificName.empty()) {
1469 if (cm::optional<std::string> found =
1470 this->FindFlagTable(toolSpecificName, table)) {
1471 filename = std::move(*found);
1472 } else {
1473 mf->IssueMessage(MessageType::FATAL_ERROR,
1474 cmStrCat("JSON flag table for ", table,
1475 " not found for toolset ", toolSpecificName));
1476 return nullptr;
1477 }
1478 } else {
1479 std::string const& genericName =
1480 this->CanonicalToolsetName(this->GetPlatformToolsetString());
1481 cm::optional<std::string> found = this->FindFlagTable(genericName, table);
1482 if (!found) {
1483 found = this->FindFlagTable(defaultName, table);
1484 }
1485 if (found) {
1486 filename = std::move(*found);
1487 } else {
1488 mf->IssueMessage(MessageType::FATAL_ERROR,
1489 cmStrCat("JSON flag table for ", table,
1490 " not found for toolset ", genericName, ' ',
1491 defaultName));
1492 return nullptr;
1493 }
1494 }
1495
1496 cm::optional<std::string> vsVer = this->GetVSInstanceVersion();
1497 if (cmIDEFlagTable const* ret = cmLoadFlagTableJson(filename, vsVer)) {
1498 return ret;
1499 }
1500
1501 mf->IssueMessage(
1502 MessageType::FATAL_ERROR,
1503 cmStrCat("JSON flag table could not be loaded:\n ", filename));
1504 return nullptr;
1505}
1506
1507cmIDEFlagTable const* cmGlobalVisualStudio10Generator::GetClFlagTable() const
1508{

Callers

nothing calls this directly

Calls 9

FindFlagTableMethod · 0.95
CanonicalToolsetNameMethod · 0.95
GetVSInstanceVersionMethod · 0.95
moveFunction · 0.85
cmLoadFlagTableJsonFunction · 0.85
GetCurrentMakefileMethod · 0.80
cmStrCatFunction · 0.70
emptyMethod · 0.45
IssueMessageMethod · 0.45

Tested by

no test coverage detected