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

Method AppendTarget

Source/cmExtraEclipseCDT4Generator.cxx:1142–1158  ·  view source on GitHub ↗

The prefix is prepended before the actual name of the target. The purpose of that is to sort the targets in the view of Eclipse, so that at first the global/utility/all/clean targets appear ": ", then the executable targets "[exe] ", then the libraries "[lib]", then the rules for the object files "[obj]", then for preprocessing only "[pre] " and finally the assembly files "[to asm] ". Note the "to

Source from the content-addressed store, hash-verified

1140// without it, "asm" would be the first targets in the list, with the "to"
1141// they are the last targets, which makes more sense.
1142void cmExtraEclipseCDT4Generator::AppendTarget(
1143 cmXMLWriter& xml, std::string const& target, std::string const& make,
1144 std::string const& makeArgs, std::string const& path, char const* prefix,
1145 char const* makeTarget)
1146{
1147 xml.StartElement("target");
1148 xml.Attribute("name", prefix + target);
1149 xml.Attribute("path", path);
1150 xml.Attribute("targetID", "org.eclipse.cdt.make.MakeTargetBuilder");
1151 xml.Element("buildCommand",
1152 cmExtraEclipseCDT4Generator::GetEclipsePath(make));
1153 xml.Element("buildArguments", makeArgs);
1154 xml.Element("buildTarget", makeTarget ? makeTarget : target.c_str());
1155 xml.Element("stopOnError", "true");
1156 xml.Element("useDefaultCommand", "false");
1157 xml.EndElement();
1158}
1159
1160void cmExtraEclipseCDT4Generator::AppendScannerProfile(
1161 cmXMLWriter& xml, std::string const& profileID, bool openActionEnabled,

Callers

nothing calls this directly

Calls 5

AttributeMethod · 0.80
c_strMethod · 0.80
StartElementMethod · 0.45
ElementMethod · 0.45
EndElementMethod · 0.45

Tested by

no test coverage detected