Add support for comments on custom commands in visual studio 6
This commit is contained in:
parent
b0656a2605
commit
ee548d8fd8
@ -299,7 +299,9 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
|
|||||||
std::string totalCommandStr;
|
std::string totalCommandStr;
|
||||||
totalCommandStr = this->CombineCommands(commands, totalCommand,
|
totalCommandStr = this->CombineCommands(commands, totalCommand,
|
||||||
source.c_str());
|
source.c_str());
|
||||||
|
const char* comment = totalCommand.m_Comment.c_str();
|
||||||
this->WriteCustomRule(fout, source.c_str(), totalCommandStr.c_str(),
|
this->WriteCustomRule(fout, source.c_str(), totalCommandStr.c_str(),
|
||||||
|
(*comment?comment:"Custom Rule"),
|
||||||
totalCommand.m_Depends,
|
totalCommand.m_Depends,
|
||||||
totalCommand.m_Outputs, compileFlags);
|
totalCommand.m_Outputs, compileFlags);
|
||||||
}
|
}
|
||||||
@ -339,6 +341,7 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
|
|||||||
void cmLocalVisualStudio6Generator::WriteCustomRule(std::ostream& fout,
|
void cmLocalVisualStudio6Generator::WriteCustomRule(std::ostream& fout,
|
||||||
const char* source,
|
const char* source,
|
||||||
const char* command,
|
const char* command,
|
||||||
|
const char* comment,
|
||||||
const std::set<std::string>& depends,
|
const std::set<std::string>& depends,
|
||||||
const std::set<std::string>& outputs,
|
const std::set<std::string>& outputs,
|
||||||
const char* flags
|
const char* flags
|
||||||
@ -370,7 +373,8 @@ void cmLocalVisualStudio6Generator::WriteCustomRule(std::ostream& fout,
|
|||||||
fout << "\n";
|
fout << "\n";
|
||||||
|
|
||||||
fout << "# PROP Ignore_Default_Tool 1\n";
|
fout << "# PROP Ignore_Default_Tool 1\n";
|
||||||
fout << "# Begin Custom Build\n\n";
|
fout << "# Begin Custom Build - Building " << comment
|
||||||
|
<< " $(InputPath)\n\n";
|
||||||
if(outputs.size() == 0)
|
if(outputs.size() == 0)
|
||||||
{
|
{
|
||||||
fout << source << "_force : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"";
|
fout << source << "_force : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"";
|
||||||
@ -505,6 +509,7 @@ cmLocalVisualStudio6Generator::CombineCommands(const cmSourceGroup::Commands &co
|
|||||||
totalCommandStr += " ";
|
totalCommandStr += " ";
|
||||||
totalCommandStr += c->second.m_Arguments;
|
totalCommandStr += c->second.m_Arguments;
|
||||||
totalCommand.Merge(c->second);
|
totalCommand.Merge(c->second);
|
||||||
|
totalCommand.m_Comment = c->second.m_Comment.c_str();
|
||||||
}
|
}
|
||||||
// Create a dummy file with the name of the source if it does
|
// Create a dummy file with the name of the source if it does
|
||||||
// not exist
|
// not exist
|
||||||
|
@ -88,6 +88,7 @@ private:
|
|||||||
void WriteCustomRule(std::ostream& fout,
|
void WriteCustomRule(std::ostream& fout,
|
||||||
const char* source,
|
const char* source,
|
||||||
const char* command,
|
const char* command,
|
||||||
|
const char* comment,
|
||||||
const std::set<std::string>& depends,
|
const std::set<std::string>& depends,
|
||||||
const std::set<std::string>& outputs,
|
const std::set<std::string>& outputs,
|
||||||
const char* flags);
|
const char* flags);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user