diff options
author | Brad King <brad.king@kitware.com> | 2002-12-31 17:59:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-12-31 17:59:02 (GMT) |
commit | c8694bb509803c94ced51091e2ea6cc365f5193e (patch) | |
tree | 778b72ba34164b50c25f1ee20fed8617ec9ac5eb /Source | |
parent | b290e5282c8b857318380ea91e210d50775627d8 (diff) | |
download | CMake-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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 9 |
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()); } |