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

Method WriteCustomRuleCSharp

Source/cmVisualStudio10TargetGenerator.cxx:1946–1974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1944}
1945
1946void cmVisualStudio10TargetGenerator::WriteCustomRuleCSharp(
1947 Elem& e0, std::string const& config, std::string const& name,
1948 std::string const& script, std::string const& inputs,
1949 std::string const& outputs, std::string const& comment,
1950 cmCustomCommandGenerator const& ccg)
1951{
1952 if (!ccg.GetFullDepfile().empty()) {
1953 this->Makefile->IssueMessage(
1954 MessageType::FATAL_ERROR,
1955 cmStrCat("CSharp target \"", this->GeneratorTarget->GetName(),
1956 "\" does not support add_custom_command DEPFILE."));
1957 }
1958 this->CSharpCustomCommandNames.insert(name);
1959 Elem e1(e0, "Target");
1960 e1.Attribute("Condition", cmStrCat("'$(Configuration)' == '", config, '\''));
1961 e1.S << "\n Name=\"" << name << "\"";
1962 e1.S << "\n Inputs=\"" << cmVS10EscapeAttr(inputs) << "\"";
1963 e1.S << "\n Outputs=\"" << cmVS10EscapeAttr(outputs) << "\"";
1964
1965 // Run before sources are compiled...
1966 e1.S << "\n BeforeTargets=\"CoreCompile\""; // BeforeBuild
1967 // ...but after output directory has been created
1968 e1.S << "\n DependsOnTargets=\"PrepareForBuild\"";
1969
1970 if (!comment.empty()) {
1971 Elem(e1, "Exec").Attribute("Command", cmStrCat("echo ", comment));
1972 }
1973 Elem(e1, "Exec").Attribute("Command", script);
1974}
1975
1976std::string cmVisualStudio10TargetGenerator::ConvertPath(
1977 std::string const& path, bool forceRelative)

Callers 1

WriteCustomRuleMethod · 0.95

Calls 9

cmVS10EscapeAttrFunction · 0.85
ElemClass · 0.85
GetFullDepfileMethod · 0.80
AttributeMethod · 0.80
cmStrCatFunction · 0.70
emptyMethod · 0.45
IssueMessageMethod · 0.45
GetNameMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected