summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-12-13 21:16:48 (GMT)
committerBrad King <brad.king@kitware.com>2002-12-13 21:16:48 (GMT)
commit3348131819bb30a592898631df11aaf8ad8db4d2 (patch)
treebc84549b8fd511222dfe58aae3d4613b17a85a4d /Source/cmLocalVisualStudio6Generator.cxx
parent7e824e83a9c97234f23640188c590201eeffea5d (diff)
downloadCMake-3348131819bb30a592898631df11aaf8ad8db4d2.zip
CMake-3348131819bb30a592898631df11aaf8ad8db4d2.tar.gz
CMake-3348131819bb30a592898631df11aaf8ad8db4d2.tar.bz2
ENH: Added source file property OBJECT_DEPENDS to support generated header files included in non-generated sources.
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx24
1 files changed, 23 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index b90de0e..64d9c83 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -280,10 +280,20 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
{
std::string source = cc->first;
const cmSourceGroup::Commands& commands = cc->second.m_Commands;
+ std::vector<std::string> depends;
const char* compileFlags = 0;
if(cc->second.m_SourceFile)
{
+ // Check for extra compiler flags.
compileFlags = cc->second.m_SourceFile->GetProperty("COMPILE_FLAGS");
+
+ // Check for extra object-file dependencies.
+ const char* dependsValue =
+ cc->second.m_SourceFile->GetProperty("OBJECT_DEPENDS");
+ if(dependsValue)
+ {
+ cmSystemTools::ExpandListArgument(dependsValue, depends);
+ }
}
if (source != libName || target.GetType() == cmTarget::UTILITY)
{
@@ -293,6 +303,18 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
// build it, then it will.
fout << "SOURCE=" <<
cmSystemTools::ConvertToOutputPath(source.c_str()) << "\n\n";
+ if(!depends.empty())
+ {
+ // Write out the dependencies for the rule.
+ fout << "USERDEP__HACK=";
+ for(std::vector<std::string>::const_iterator d = depends.begin();
+ d != depends.end(); ++d)
+ {
+ fout << "\\\n\t" <<
+ cmSystemTools::ConvertToOutputPath(d->c_str());
+ }
+ fout << "\n";
+ }
if (!commands.empty())
{
cmSourceGroup::CommandFiles totalCommand;
@@ -385,7 +407,7 @@ void cmLocalVisualStudio6Generator::WriteCustomRule(std::ostream& fout,
for(std::set<std::string>::const_iterator output = outputs.begin();
output != outputs.end(); ++output)
{
- fout << "\"" << output->c_str()
+ fout << "\"" << cmSystemTools::ConvertToOutputPath(output->c_str())
<< "\" : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"";
fout << command << "\n\n";
}