diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-12-10 22:52:45 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-12-10 22:52:45 (GMT) |
commit | ee548d8fd89277884cd2f24f92fee4092491f136 (patch) | |
tree | e0d7342a145c12bb9544089790d9c88caf913571 | |
parent | b0656a2605fc9556736459b51a2ad94b65765578 (diff) | |
download | CMake-ee548d8fd89277884cd2f24f92fee4092491f136.zip CMake-ee548d8fd89277884cd2f24f92fee4092491f136.tar.gz CMake-ee548d8fd89277884cd2f24f92fee4092491f136.tar.bz2 |
Add support for comments on custom commands in visual studio 6
-rw-r--r-- | Source/cmLocalVisualStudio6Generator.cxx | 7 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio6Generator.h | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 9ec0ece..50ec93c 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 diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h index 81b905b..a9e1145 100644 --- a/Source/cmLocalVisualStudio6Generator.h +++ b/Source/cmLocalVisualStudio6Generator.h @@ -88,6 +88,7 @@ private: void 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); |