BUG: fix crash with force cxx type

This commit is contained in:
Bill Hoffman 2003-03-17 09:29:10 -05:00
parent 0afb1fa1aa
commit d4d2779542
2 changed files with 10 additions and 2 deletions

View File

@ -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)

View File

@ -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)