summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-12-31 17:59:02 (GMT)
committerBrad King <brad.king@kitware.com>2002-12-31 17:59:02 (GMT)
commitc8694bb509803c94ced51091e2ea6cc365f5193e (patch)
tree778b72ba34164b50c25f1ee20fed8617ec9ac5eb
parentb290e5282c8b857318380ea91e210d50775627d8 (diff)
downloadCMake-c8694bb509803c94ced51091e2ea6cc365f5193e.zip
CMake-c8694bb509803c94ced51091e2ea6cc365f5193e.tar.gz
CMake-c8694bb509803c94ced51091e2ea6cc365f5193e.tar.bz2
BUG: When there are no link flags, we want an empty string, not a null pointer.
-rw-r--r--Source/cmLocalUnixMakefileGenerator.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx
index 2fb7a27..9da1eaf 100644
--- a/Source/cmLocalUnixMakefileGenerator.cxx
+++ b/Source/cmLocalUnixMakefileGenerator.cxx
@@ -1000,12 +1000,19 @@ void cmLocalUnixMakefileGenerator::OutputStaticLibraryRule(std::ostream& fout,
{
targetSuffix = this->GetSafeDefinition("CMAKE_STATIC_LIBRARY_SUFFIX");
}
+ std::string linkFlags;
+ const char* targetLinkFlags = t.GetProperty("LINK_FLAGS");
+ if(targetLinkFlags)
+ {
+ linkFlags += targetLinkFlags;
+ linkFlags += " ";
+ }
this->OutputLibraryRule(fout, name, t,
targetPrefix,
targetSuffix,
createRule,
"static library",
- t.GetProperty("LINK_FLAGS"));
+ linkFlags.c_str());
}