BUG: prevent segfault when no sources provided for lib

This commit is contained in:
Ken Martin 2005-06-08 16:31:34 -04:00
parent bbf1c3a0e8
commit 4ff9d1eae3
1 changed files with 12 additions and 3 deletions

View File

@ -1448,7 +1448,10 @@ cmLocalUnixMakefileGenerator3
const char* linkLanguage =
target.GetLinkerLanguage(this->GetGlobalGenerator());
std::string linkRuleVar = "CMAKE_";
linkRuleVar += linkLanguage;
if (linkLanguage)
{
linkRuleVar += linkLanguage;
}
linkRuleVar += "_CREATE_STATIC_LIBRARY";
std::string extraFlags;
@ -1471,7 +1474,10 @@ cmLocalUnixMakefileGenerator3
const char* linkLanguage =
target.GetLinkerLanguage(this->GetGlobalGenerator());
std::string linkRuleVar = "CMAKE_";
linkRuleVar += linkLanguage;
if (linkLanguage)
{
linkRuleVar += linkLanguage;
}
linkRuleVar += "_CREATE_SHARED_LIBRARY";
std::string extraFlags;
@ -1510,7 +1516,10 @@ cmLocalUnixMakefileGenerator3
const char* linkLanguage =
target.GetLinkerLanguage(this->GetGlobalGenerator());
std::string linkRuleVar = "CMAKE_";
linkRuleVar += linkLanguage;
if (linkLanguage)
{
linkRuleVar += linkLanguage;
}
linkRuleVar += "_CREATE_SHARED_MODULE";
std::string extraFlags;