summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator2.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-02-24 14:21:15 (GMT)
committerBrad King <brad.king@kitware.com>2005-02-24 14:21:15 (GMT)
commite9da9cc3d7b7c710aa0960e6cabd85d5d878bc76 (patch)
tree5132382adb5b3de4c322cdc99e895ca979f54380 /Source/cmLocalUnixMakefileGenerator2.cxx
parent77194207ce96c09ec2fdf5a334f6ed9d3a8ebef9 (diff)
downloadCMake-e9da9cc3d7b7c710aa0960e6cabd85d5d878bc76.zip
CMake-e9da9cc3d7b7c710aa0960e6cabd85d5d878bc76.tar.gz
CMake-e9da9cc3d7b7c710aa0960e6cabd85d5d878bc76.tar.bz2
BUG: Do not crash when the link language for a target is not known.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator2.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator2.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx
index 400c3be..a8023e5 100644
--- a/Source/cmLocalUnixMakefileGenerator2.cxx
+++ b/Source/cmLocalUnixMakefileGenerator2.cxx
@@ -1605,6 +1605,14 @@ cmLocalUnixMakefileGenerator2
const char* linkLanguage =
target.GetLinkerLanguage(this->GetGlobalGenerator());
+ // Make sure we have a link language.
+ if(!linkLanguage)
+ {
+ cmSystemTools::Error("Cannot determine link language for target \"",
+ target.GetName(), "\".");
+ return;
+ }
+
// Build a list of compiler flags and linker flags.
std::string flags;
std::string linkFlags;