| 1141 | } |
| 1142 | |
| 1143 | void cmGlobalFastbuildGenerator::WriteExec(FastbuildExecNode const& Exec, |
| 1144 | int indent) |
| 1145 | { |
| 1146 | auto const identPlus1 = indent + 1; |
| 1147 | WriteCommand("Exec", Exec.Name.empty() ? std::string{} : Quote(Exec.Name), |
| 1148 | indent); |
| 1149 | Indent(indent); |
| 1150 | *BuildFileStream << "{\n"; |
| 1151 | { |
| 1152 | if (!Exec.PreBuildDependencies.empty()) { |
| 1153 | WriteArray("PreBuildDependencies", Wrap(Exec.PreBuildDependencies), |
| 1154 | identPlus1); |
| 1155 | } |
| 1156 | WriteVariable("ExecExecutable", Quote(Exec.ExecExecutable), identPlus1); |
| 1157 | if (!Exec.ExecArguments.empty()) { |
| 1158 | WriteVariable("ExecArguments", Quote(Exec.ExecArguments), identPlus1); |
| 1159 | } |
| 1160 | if (!Exec.ExecWorkingDir.empty()) { |
| 1161 | WriteVariable("ExecWorkingDir", Quote(Exec.ExecWorkingDir), identPlus1); |
| 1162 | } |
| 1163 | if (!Exec.ExecInput.empty()) { |
| 1164 | WriteArray("ExecInput", Wrap(Exec.ExecInput), identPlus1); |
| 1165 | } |
| 1166 | if (Exec.ExecUseStdOutAsOutput) { |
| 1167 | WriteVariable("ExecUseStdOutAsOutput", "true", identPlus1); |
| 1168 | } |
| 1169 | if (!Exec.ExecInputPath.empty()) { |
| 1170 | WriteArray("ExecInputPath", Wrap(Exec.ExecInputPath), identPlus1); |
| 1171 | } |
| 1172 | if (!Exec.ExecInputPattern.empty()) { |
| 1173 | WriteArray("ExecInputPattern", Wrap(Exec.ExecInputPattern), identPlus1); |
| 1174 | } |
| 1175 | WriteVariable("ExecAlwaysShowOutput", "true", identPlus1); |
| 1176 | WriteVariable("ExecOutput", Quote(Exec.ExecOutput), identPlus1); |
| 1177 | WriteVariable("ExecAlways", Exec.ExecAlways ? "true" : "false", |
| 1178 | identPlus1); |
| 1179 | if (!Exec.ConcurrencyGroupName.empty()) { |
| 1180 | WriteVariable("ConcurrencyGroupName", Quote(Exec.ConcurrencyGroupName), |
| 1181 | identPlus1); |
| 1182 | } |
| 1183 | } |
| 1184 | Indent(indent); |
| 1185 | *BuildFileStream << "}\n"; |
| 1186 | static bool const verbose = GlobalSettingIsOn(FASTBUILD_VERBOSE_GENERATOR) || |
| 1187 | cmSystemTools::HasEnv(FASTBUILD_VERBOSE_GENERATOR); |
| 1188 | // Those aliases are only used for troubleshooting the generated file. |
| 1189 | if (verbose) { |
| 1190 | WriteAlias(Exec.OutputsAlias); |
| 1191 | WriteAlias(Exec.ByproductsAlias); |
| 1192 | } |
| 1193 | } |
| 1194 | |
| 1195 | void cmGlobalFastbuildGenerator::WriteUnity(FastbuildUnityNode const& Unity) |
| 1196 | { |
no test coverage detected