diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-06-08 20:31:34 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-06-08 20:31:34 (GMT) |
commit | 4ff9d1eae3945590fdc8e7ca6539b856418e5684 (patch) | |
tree | 6b706f489506fb74858b63460db3c82a955ca631 | |
parent | bbf1c3a0e87c4358b65d41393455fc393d8e16e0 (diff) | |
download | CMake-4ff9d1eae3945590fdc8e7ca6539b856418e5684.zip CMake-4ff9d1eae3945590fdc8e7ca6539b856418e5684.tar.gz CMake-4ff9d1eae3945590fdc8e7ca6539b856418e5684.tar.bz2 |
BUG: prevent segfault when no sources provided for lib
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index bf70240..df0c2c0 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -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; |