summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2003-06-16 14:20:48 (GMT)
committerKen Martin <ken.martin@kitware.com>2003-06-16 14:20:48 (GMT)
commitf76d01d56a48e1a00ea491681d219d547d3a7a94 (patch)
tree01b583322cddf29f980aa58df95d6886e09272a5 /Source
parenta5d930a686b74fc6d2621d0a03c745bc534282e8 (diff)
downloadCMake-f76d01d56a48e1a00ea491681d219d547d3a7a94.zip
CMake-f76d01d56a48e1a00ea491681d219d547d3a7a94.tar.gz
CMake-f76d01d56a48e1a00ea491681d219d547d3a7a94.tar.bz2
fix for vs6 rule files
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index 055ac3a..23eb7a6 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -315,6 +315,8 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
srcFilesToProcess.pop();
}
+ // now all of the source files have been properly assigned to the target
+ // now stick them into source groups using the reg expressions
for(std::vector<cmSourceFile*>::iterator i = classes.begin();
i != classes.end(); i++)
{
@@ -323,6 +325,27 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
cmSourceGroup& sourceGroup = m_Makefile->FindSourceGroup(source.c_str(),
sourceGroups);
sourceGroup.AddSource(source.c_str(), *i);
+ // while we are at it, if it is a .rule file then for visual studio 6 we
+ // must generate it
+ if ((*i)->GetSourceExtension() == "rule")
+ {
+ if(!cmSystemTools::FileExists(source.c_str()))
+ {
+#if defined(_WIN32) || defined(__CYGWIN__)
+ std::ofstream fout(source.c_str(),
+ std::ios::binary | std::ios::out | std::ios::trunc);
+#else
+ std::ofstream fout(source.c_str(),
+ std::ios::out | std::ios::trunc);
+#endif
+ if(fout)
+ {
+ fout.write("# generated from CMake",22);
+ fout.flush();
+ fout.close();
+ }
+ }
+ }
}
// Write the DSP file's header.