| 783 | } |
| 784 | |
| 785 | std::string cmLocalNinjaGenerator::CreateUtilityOutput( |
| 786 | std::string const& targetName, std::vector<std::string> const& byproducts, |
| 787 | cmListFileBacktrace const& bt) |
| 788 | { |
| 789 | // In Ninja Multi-Config, we can only produce cross-config utility |
| 790 | // commands if all byproducts are per-config. |
| 791 | if (!this->GetGlobalGenerator()->IsMultiConfig() || |
| 792 | !this->HasUniqueByproducts(byproducts, bt)) { |
| 793 | return this->cmLocalGenerator::CreateUtilityOutput(targetName, byproducts, |
| 794 | bt); |
| 795 | } |
| 796 | |
| 797 | std::string const base = cmStrCat(this->GetCurrentBinaryDirectory(), |
| 798 | "/CMakeFiles/", targetName, '-'); |
| 799 | // The output is not actually created so mark it symbolic. |
| 800 | for (std::string const& config : this->GetConfigNames()) { |
| 801 | std::string const force = cmStrCat(base, config); |
| 802 | if (cmSourceFile* sf = this->Makefile->GetOrCreateGeneratedSource(force)) { |
| 803 | sf->SetProperty("SYMBOLIC", "1"); |
| 804 | } else { |
| 805 | cmSystemTools::Error("Could not get source file entry for " + force); |
| 806 | } |
| 807 | } |
| 808 | this->GetGlobalNinjaGenerator()->AddPerConfigUtilityTarget(targetName); |
| 809 | return cmStrCat(base, "$<CONFIG>"_s); |
| 810 | } |
| 811 | |
| 812 | std::vector<cmCustomCommandGenerator> |
| 813 | cmLocalNinjaGenerator::MakeCustomCommandGenerators( |
nothing calls this directly
no test coverage detected