summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2005-06-08 20:31:34 (GMT)
committerKen Martin <ken.martin@kitware.com>2005-06-08 20:31:34 (GMT)
commit4ff9d1eae3945590fdc8e7ca6539b856418e5684 (patch)
tree6b706f489506fb74858b63460db3c82a955ca631
parentbbf1c3a0e87c4358b65d41393455fc393d8e16e0 (diff)
downloadCMake-4ff9d1eae3945590fdc8e7ca6539b856418e5684.zip
CMake-4ff9d1eae3945590fdc8e7ca6539b856418e5684.tar.gz
CMake-4ff9d1eae3945590fdc8e7ca6539b856418e5684.tar.bz2
BUG: prevent segfault when no sources provided for lib
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx15
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;