| 137 | } |
| 138 | |
| 139 | std::string cmFastbuildTargetGenerator::GetCustomCommandTargetName( |
| 140 | cmCustomCommand const& cc, FastbuildBuildStep step) const |
| 141 | { |
| 142 | std::string const extra = this->Makefile->GetCurrentBinaryDirectory(); |
| 143 | std::string targetName = "cc"; |
| 144 | |
| 145 | std::string extras = extra; |
| 146 | |
| 147 | // Compute hash based on commands & args & output. |
| 148 | for (cmCustomCommandLine const& commandLine : cc.GetCommandLines()) { |
| 149 | extras += cmJoin(commandLine, ""); |
| 150 | } |
| 151 | for (std::string const& output : cc.GetOutputs()) { |
| 152 | extras += output; |
| 153 | } |
| 154 | |
| 155 | extras += std::to_string(static_cast<int>(step)); |
| 156 | |
| 157 | cmCryptoHash hash(cmCryptoHash::AlgoSHA256); |
| 158 | targetName += "-" + hash.HashString(extras).substr(0, 14); |
| 159 | |
| 160 | return targetName; |
| 161 | } |
| 162 | |
| 163 | void cmFastbuildTargetGenerator::WriteScriptProlog(cmsys::ofstream& file) const |
| 164 | { |
no test coverage detected