| 536 | } |
| 537 | |
| 538 | void 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 | |
| 579 | void cmGlobalFastbuildGenerator::WriteEnvironment() |
| 580 | { |
no test coverage detected