diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-10-27 14:53:01 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-10-27 14:53:01 (GMT) |
commit | 36c8f1d15792192790f0841d5658a105f44b420b (patch) | |
tree | 488e5dcf19787ed344fb62e7724964b6d899f393 /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 56234aed4bfc87b691897056c4535b4d8cb3098f (diff) | |
download | CMake-36c8f1d15792192790f0841d5658a105f44b420b.zip CMake-36c8f1d15792192790f0841d5658a105f44b420b.tar.gz CMake-36c8f1d15792192790f0841d5658a105f44b420b.tar.bz2 |
ENH: put error checking for missing linker languages
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 0087b3e..4718974 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -329,6 +329,12 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, if(strcmp(configType, "10") != 0) { const char* linkLanguage = target.GetLinkerLanguage(this->GetGlobalGenerator()); + if(!linkLanguage) + { + cmSystemTools::Error("CMake can not determine linker language for target:", + target.GetName()); + return; + } std::string baseFlagVar = "CMAKE_"; baseFlagVar += linkLanguage; baseFlagVar += "_FLAGS"; @@ -629,6 +635,12 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, fout << "\t\t\t\tGenerateDebugInformation=\"TRUE\"\n"; } const char* linkLanguage = target.GetLinkerLanguage(this->GetGlobalGenerator()); + if(!linkLanguage) + { + cmSystemTools::Error("CMake can not determine linker language for target:", + target.GetName()); + return; + } std::string stackVar = "CMAKE_"; stackVar += linkLanguage; stackVar += "_STACK_SIZE"; @@ -697,8 +709,14 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, { fout << "\t\t\t\tSubSystem=\"1\"\n"; } - const char* linkLanguage = target.GetLinkerLanguage(this->GetGlobalGenerator()); - std::string stackVar = "CMAKE_"; + const char* linkLanguage = target.GetLinkerLanguage(this->GetGlobalGenerator()); + if(!linkLanguage) + { + cmSystemTools::Error("CMake can not determine linker language for target:", + target.GetName()); + return; + } + std::string stackVar = "CMAKE_"; stackVar += linkLanguage; stackVar += "_STACK_SIZE"; const char* stackVal = m_Makefile->GetDefinition(stackVar.c_str()); |