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

Method WriteTarget

Source/cmGlobalFastbuildGenerator.cxx:1382–1446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1380}
1381
1382void cmGlobalFastbuildGenerator::WriteTarget(FastbuildTarget const& target)
1383{
1384 for (auto const& val : target.Variables) {
1385 auto const& key = val.first;
1386 auto const& value = val.second;
1387 WriteVariable(key, cmGlobalFastbuildGenerator::Quote(value), 1);
1388 }
1389 // add_custom_commands(...)
1390 for (auto const& alias : { target.ExecNodes }) {
1391 this->WriteAlias(alias);
1392 }
1393
1394 // -deps Alias.
1395 this->WriteAlias(target.DependenciesAlias);
1396
1397 // PRE_BUILD.
1398 for (auto const& alias : { target.PreBuildExecNodes }) {
1399 this->WriteAlias(alias);
1400 }
1401
1402 // Copy commands.
1403
1404 for (FastbuildCopyNode const& node : target.CopyNodes) {
1405 this->WriteCopy(node);
1406 }
1407
1408 // Unity.
1409 for (FastbuildUnityNode const& unity : target.UnityNodes) {
1410 this->WriteUnity(unity);
1411 }
1412
1413 // Objects.
1414 for (FastbuildObjectListNode const& objectList : target.ObjectListNodes) {
1415 this->WriteObjectList(objectList, target.AllowDistribution);
1416 }
1417
1418 if (!target.PreLinkExecNodes.Nodes.empty()) {
1419 for (auto const& exec : target.PreLinkExecNodes.Nodes) {
1420 this->WriteExec(exec);
1421 }
1422 this->WriteAlias(target.PreLinkExecNodes.Alias);
1423 }
1424
1425 // Libraries / executables.
1426 if (!target.LinkerNode.empty()) {
1427 for (auto const& cudaDeviceLinkNode : target.CudaDeviceLinkNode) {
1428 this->WriteLinker(cudaDeviceLinkNode, target.AllowDistribution);
1429 }
1430 for (auto const& linkerNode : target.LinkerNode) {
1431 this->WriteLinker(linkerNode, target.AllowDistribution);
1432 }
1433 }
1434
1435 if (!target.PostBuildExecNodes.Nodes.empty()) {
1436 for (auto const& exec : target.PostBuildExecNodes.Nodes) {
1437 this->WriteExec(exec);
1438 }
1439 this->WriteAlias(target.PostBuildExecNodes.Alias);

Callers 1

WriteTargetsMethod · 0.95

Calls 7

WriteAliasMethod · 0.95
WriteCopyMethod · 0.95
WriteUnityMethod · 0.95
WriteObjectListMethod · 0.95
WriteExecMethod · 0.95
WriteLinkerMethod · 0.95
emptyMethod · 0.45

Tested by

no test coverage detected