summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-03-17 14:29:10 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-03-17 14:29:10 (GMT)
commitd4d27795424f887668b628ae4d08a69b401760bd (patch)
treef4b9a1ea4f7ae4d537e100c37a44d248e0b54f96 /Source
parent0afb1fa1aa84302e6dc50cec3418add7adce4474 (diff)
downloadCMake-d4d27795424f887668b628ae4d08a69b401760bd.zip
CMake-d4d27795424f887668b628ae4d08a69b401760bd.tar.gz
CMake-d4d27795424f887668b628ae4d08a69b401760bd.tar.bz2
BUG: fix crash with force cxx type
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalVisualStudio6Generator.cxx6
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx6
2 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx
index ec4bbe2..d2fa74c 100644
--- a/Source/cmLocalVisualStudio6Generator.cxx
+++ b/Source/cmLocalVisualStudio6Generator.cxx
@@ -293,7 +293,11 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
if(cc->second.m_SourceFile)
{
// Check for extra compiler flags.
- compileFlags = cc->second.m_SourceFile->GetProperty("COMPILE_FLAGS");
+ const char* cflags = cc->second.m_SourceFile->GetProperty("COMPILE_FLAGS");
+ if(cflags)
+ {
+ compileFlags = cflags;
+ }
if(cmSystemTools::GetFileFormat(
cc->second.m_SourceFile->GetSourceExtension().c_str())
== cmSystemTools::CXX_FILE_FORMAT)
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index da80e6f..64ba57d 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -729,7 +729,11 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout,
if(cc->second.m_SourceFile)
{
// Check for extra compiler flags.
- compileFlags = cc->second.m_SourceFile->GetProperty("COMPILE_FLAGS");
+ const char* cflags = cc->second.m_SourceFile->GetProperty("COMPILE_FLAGS");
+ if(cflags)
+ {
+ compileFlags = cc->second.m_SourceFile->GetProperty("COMPILE_FLAGS");
+ }
if(cmSystemTools::GetFileFormat(
cc->second.m_SourceFile->GetSourceExtension().c_str())
== cmSystemTools::CXX_FILE_FORMAT)