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

Method WriteSettings

Source/cmGlobalFastbuildGenerator.cxx:538–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536}
537
538void cmGlobalFastbuildGenerator::WriteSettings()
539{
540 // Define some placeholder
541 WriteDivider();
542 *this->BuildFileStream << "// Helper variables\n\n";
543
544 WriteVariable("FB_INPUT_1_PLACEHOLDER", Quote("\"%1\""));
545 WriteVariable("FB_INPUT_1_0_PLACEHOLDER", Quote("\"%1[0]\""));
546 WriteVariable("FB_INPUT_1_1_PLACEHOLDER", Quote("\"%1[1]\""));
547 WriteVariable("FB_INPUT_2_PLACEHOLDER", Quote("\"%2\""));
548 WriteVariable("FB_INPUT_3_PLACEHOLDER", Quote("\"%3\""));
549
550 std::string cacheDir;
551 // If explicitly set from CMake.
552 auto val = this->GetSafeGlobalSetting(FASTBUILD_CACHE_PATH);
553 if (!val.empty()) {
554 cacheDir = std::move(val);
555 cmSystemTools::ConvertToOutputSlashes(cacheDir);
556 }
557
558 WriteDivider();
559 *this->BuildFileStream << "// Settings\n\n";
560
561 WriteCommand("Settings");
562 *this->BuildFileStream << "{\n";
563 if (!cacheDir.empty()) {
564 WriteVariable("CachePath", Quote(cacheDir), 1);
565 }
566 // Concurrency groups.
567 WriteStruct(
568 FASTBUILD_UTIL_CONCURRENCY_GROUP_NAME,
569 { { "ConcurrencyGroupName", Quote(FASTBUILD_UTIL_CONCURRENCY_GROUP_NAME) },
570 { "ConcurrencyLimit", "1" } },
571 1);
572
573 WriteArray("ConcurrencyGroups",
574 { "." FASTBUILD_UTIL_CONCURRENCY_GROUP_NAME }, 1);
575
576 *this->BuildFileStream << "}\n";
577}
578
579void cmGlobalFastbuildGenerator::WriteEnvironment()
580{

Callers 1

GenerateMethod · 0.95

Calls 3

moveFunction · 0.85
GetSafeGlobalSettingMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected