BUG: Do not crash when the link language for a target is not known.
This commit is contained in:
parent
77194207ce
commit
e9da9cc3d7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue