From aa1b32218a0664242ebd2ba988194f98026b88ac Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 5 Aug 2004 09:17:25 -0400 Subject: BUG: Fixed crash when CMAKE_CXX_STACK_SIZE is not defined. --- Source/cmLocalVisualStudio7Generator.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 3111232..7e813cd 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -620,8 +620,11 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, { fout << "\t\t\t\tGenerateDebugInformation=\"TRUE\"\n"; } - fout << "\t\t\t\tStackReserveSize=\"" - << m_Makefile->GetDefinition("CMAKE_CXX_STACK_SIZE") << "\"\n"; + if(const char* stacksize = m_Makefile->GetDefinition("CMAKE_CXX_STACK_SIZE")) + { + fout << "\t\t\t\tStackReserveSize=\"" + << stacksize << "\"\n"; + } temp = m_LibraryOutputPath; temp += configName; temp += "/"; @@ -680,8 +683,11 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, { fout << "\t\t\t\tSubSystem=\"1\"\n"; } - fout << "\t\t\t\tStackReserveSize=\"" - << m_Makefile->GetDefinition("CMAKE_CXX_STACK_SIZE") << "\"/>\n"; + if(const char* stacksize = m_Makefile->GetDefinition("CMAKE_CXX_STACK_SIZE")) + { + fout << "\t\t\t\tStackReserveSize=\"" + << stacksize << "\"/>\n"; + } break; case cmTarget::UTILITY: break; -- cgit v0.12