| 1944 | } |
| 1945 | |
| 1946 | void 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 | |
| 1976 | std::string cmVisualStudio10TargetGenerator::ConvertPath( |
| 1977 | std::string const& path, bool forceRelative) |
no test coverage detected