summaryrefslogtreecommitdiff
path: root/Source/cmLocalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-12-10 17:52:45 -0500
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-12-10 17:52:45 -0500
commitee548d8fd89277884cd2f24f92fee4092491f136 (patch)
treee0d7342a145c12bb9544089790d9c88caf913571 /Source/cmLocalVisualStudio6Generator.cxx
parentb0656a2605fc9556736459b51a2ad94b65765578 (diff)
downloadcmake-ee548d8fd89277884cd2f24f92fee4092491f136.tar.gz
Add support for comments on custom commands in visual studio 6
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 9ec0ece2a7..50ec93c5f8 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -299,7 +299,9 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
std::string totalCommandStr;
totalCommandStr = this->CombineCommands(commands, totalCommand,
source.c_str());
+ const char* comment = totalCommand.m_Comment.c_str();
this->WriteCustomRule(fout, source.c_str(), totalCommandStr.c_str(),
+ (*comment?comment:"Custom Rule"),
totalCommand.m_Depends,
totalCommand.m_Outputs, compileFlags);
}
@@ -339,6 +341,7 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
void cmLocalVisualStudio6Generator::WriteCustomRule(std::ostream& fout,
const char* source,
const char* command,
+ const char* comment,
const std::set<std::string>& depends,
const std::set<std::string>& outputs,
const char* flags
@@ -370,7 +373,8 @@ void cmLocalVisualStudio6Generator::WriteCustomRule(std::ostream& fout,
fout << "\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)
{
fout << source << "_force : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"";
@@ -505,6 +509,7 @@ cmLocalVisualStudio6Generator::CombineCommands(const cmSourceGroup::Commands &co
totalCommandStr += " ";
totalCommandStr += c->second.m_Arguments;
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
// not exist