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

Method WriteObjectList

Source/cmGlobalFastbuildGenerator.cxx:1216–1264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1214}
1215
1216void cmGlobalFastbuildGenerator::WriteObjectList(
1217 FastbuildObjectListNode const& ObjectList, bool allowDistribution)
1218{
1219 WriteCommand("ObjectList", Quote(ObjectList.Name), 1);
1220 Indent(1);
1221 *BuildFileStream << "{\n";
1222 {
1223 if (!allowDistribution) {
1224 WriteVariable("AllowDistribution", "false", 2);
1225 }
1226 if (!ObjectList.PreBuildDependencies.empty()) {
1227 WriteArray("PreBuildDependencies", Wrap(ObjectList.PreBuildDependencies),
1228 2);
1229 }
1230 WriteVariable("Compiler", ObjectList.Compiler, 2);
1231 // If only PCH output is present - this node reuses existing PCH.
1232 if (!ObjectList.PCHOutputFile.empty()) {
1233 WriteVariable("PCHOutputFile", Quote(ObjectList.PCHOutputFile), 2);
1234 }
1235 // If PCHInputFile and PCHOptions are present - this node creates PCH.
1236 if (!ObjectList.PCHInputFile.empty() && !ObjectList.PCHOptions.empty()) {
1237 WriteVariable("PCHInputFile", Quote(ObjectList.PCHInputFile), 2);
1238 WriteVariable("PCHOptions", Quote(ObjectList.PCHOptions), 2);
1239 }
1240 WriteVariable("CompilerOptions", Quote(ObjectList.CompilerOptions), 2);
1241 WriteVariable("CompilerOutputPath", Quote(ObjectList.CompilerOutputPath),
1242 2);
1243 WriteVariable("CompilerOutputExtension",
1244 Quote(ObjectList.CompilerOutputExtension), 2);
1245 WriteVariable("CompilerOutputKeepBaseExtension", "true", 2);
1246 if (!ObjectList.CompilerInputUnity.empty()) {
1247 WriteArray("CompilerInputUnity", Wrap(ObjectList.CompilerInputUnity), 2);
1248 }
1249 if (!ObjectList.CompilerInputFiles.empty()) {
1250 WriteArray("CompilerInputFiles", Wrap(ObjectList.CompilerInputFiles), 2);
1251 }
1252 if (!ObjectList.AllowCaching) {
1253 WriteVariable("AllowCaching", "false", 2);
1254 }
1255 if (!ObjectList.AllowDistribution) {
1256 WriteVariable("AllowDistribution", "false", 2);
1257 }
1258 if (ObjectList.Hidden) {
1259 WriteVariable("Hidden", "true", 2);
1260 }
1261 }
1262 Indent(1);
1263 *BuildFileStream << "}\n";
1264}
1265
1266void cmGlobalFastbuildGenerator::WriteLinker(
1267 FastbuildLinkerNode const& LinkerNode, bool allowDistribution)

Callers 1

WriteTargetMethod · 0.95

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected