summaryrefslogtreecommitdiff
path: root/Source/cmLocalVisualStudio6Generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalVisualStudio6Generator.cxx')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx35
1 files changed, 17 insertions, 18 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index f15322be6..dc94476c8 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -325,19 +325,22 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
if(!cmSystemTools::FileExists(source.c_str()))
{
cmSystemTools::ReplaceString(source, "$(IntDir)/", "");
+ // Make sure the path exists for the file
+ std::string path = cmSystemTools::GetFilenamePath(source);
+ cmSystemTools::MakeDirectory(path.c_str());
#if defined(_WIN32) || defined(__CYGWIN__)
- std::ofstream fout(source.c_str(),
+ std::ofstream sourceFout(source.c_str(),
std::ios::binary | std::ios::out
| std::ios::trunc);
#else
- std::ofstream fout(source.c_str(),
+ std::ofstream sourceFout(source.c_str(),
std::ios::out | std::ios::trunc);
#endif
- if(fout)
+ if(sourceFout)
{
- fout.write("# generated from CMake",22);
- fout.flush();
- fout.close();
+ sourceFout.write("# generated from CMake",22);
+ sourceFout.flush();
+ sourceFout.close();
}
}
}
@@ -710,6 +713,8 @@ void cmLocalVisualStudio6Generator::SetBuildType(BuildType b,
switch(b)
{
+ case WIN32_EXECUTABLE:
+ break;
case STATIC_LIBRARY:
this->DSPHeaderTemplate = root;
this->DSPHeaderTemplate += "/staticLibHeader.dsptemplate";
@@ -1695,25 +1700,21 @@ void cmLocalVisualStudio6Generator
std::set<std::string> minsizeDefinesSet;
std::set<std::string> debugrelDefinesSet;
-
- cmGeneratorTarget* gt =
- this->GlobalGenerator->GetGeneratorTarget(&target);
-
this->AppendDefines(
definesSet,
- gt->GetCompileDefinitions());
+ target.GetCompileDefinitions(0));
this->AppendDefines(
debugDefinesSet,
- gt->GetCompileDefinitions("DEBUG"));
+ target.GetCompileDefinitions("DEBUG"));
this->AppendDefines(
releaseDefinesSet,
- gt->GetCompileDefinitions("RELEASE"));
+ target.GetCompileDefinitions("RELEASE"));
this->AppendDefines(
minsizeDefinesSet,
- gt->GetCompileDefinitions("MINSIZEREL"));
+ target.GetCompileDefinitions("MINSIZEREL"));
this->AppendDefines(
debugrelDefinesSet,
- gt->GetCompileDefinitions("RELWITHDEBINFO"));
+ target.GetCompileDefinitions("RELWITHDEBINFO"));
std::string defines = " ";
std::string debugDefines = " ";
@@ -1783,10 +1784,8 @@ void cmLocalVisualStudio6Generator
const std::string extraOptions,
std::string& options)
{
- cmGeneratorTarget* gt =
- this->GlobalGenerator->GetGeneratorTarget(&target);
// Compute the link information for this configuration.
- cmComputeLinkInformation* pcli = gt->GetLinkInformation(configName);
+ cmComputeLinkInformation* pcli = target.GetLinkInformation(configName);
if(!pcli)
{
return;