summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-10-27 14:53:01 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-10-27 14:53:01 (GMT)
commit36c8f1d15792192790f0841d5658a105f44b420b (patch)
tree488e5dcf19787ed344fb62e7724964b6d899f393 /Source/cmLocalUnixMakefileGenerator.cxx
parent56234aed4bfc87b691897056c4535b4d8cb3098f (diff)
downloadCMake-36c8f1d15792192790f0841d5658a105f44b420b.zip
CMake-36c8f1d15792192790f0841d5658a105f44b420b.tar.gz
CMake-36c8f1d15792192790f0841d5658a105f44b420b.tar.bz2
ENH: put error checking for missing linker languages
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx25
1 files changed, 24 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index 827ad72..9ff5624 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -876,6 +876,12 @@ void cmLocalUnixMakefileGenerator::OutputSharedLibraryRule(std::ostream& fout,
const cmTarget &t)
{
const char* linkLanguage = t.GetLinkerLanguage(this->GetGlobalGenerator());
+ if(!linkLanguage)
+ {
+ cmSystemTools::Error("CMake can not determine linker language target:",
+ t.GetName());
+ return;
+ }
std::string createRule = "CMAKE_";
createRule += linkLanguage;
createRule += "_CREATE_SHARED_LIBRARY";
@@ -922,6 +928,12 @@ void cmLocalUnixMakefileGenerator::OutputModuleLibraryRule(std::ostream& fout,
const cmTarget &t)
{
const char* linkLanguage = t.GetLinkerLanguage(this->GetGlobalGenerator());
+ if(!linkLanguage)
+ {
+ cmSystemTools::Error("CMake can not determine linker language for target:",
+ t.GetName());
+ return;
+ }
std::string createRule = "CMAKE_";
createRule += linkLanguage;
createRule += "_CREATE_SHARED_MODULE";
@@ -954,6 +966,12 @@ void cmLocalUnixMakefileGenerator::OutputStaticLibraryRule(std::ostream& fout,
const cmTarget &t)
{
const char* linkLanguage = t.GetLinkerLanguage(this->GetGlobalGenerator());
+ if(!linkLanguage)
+ {
+ cmSystemTools::Error("CMake can not determine linker language for target:",
+ t.GetName());
+ return;
+ }
std::string createRule = "CMAKE_";
createRule += linkLanguage;
createRule += "_CREATE_STATIC_LIBRARY";
@@ -1034,7 +1052,12 @@ void cmLocalUnixMakefileGenerator::OutputExecutableRule(std::ostream& fout,
linkFlags += " ";
}
const char* linkLanguage = t.GetLinkerLanguage(this->GetGlobalGenerator());
-
+ if(!linkLanguage)
+ {
+ cmSystemTools::Error("CMake can not determine linker language for target:",
+ t.GetName());
+ return;
+ }
std::string langVar = "CMAKE_";
langVar += linkLanguage;