From c8694bb509803c94ced51091e2ea6cc365f5193e Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 31 Dec 2002 12:59:02 -0500 Subject: [PATCH] BUG: When there are no link flags, we want an empty string, not a null pointer. --- Source/cmLocalUnixMakefileGenerator.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 2fb7a27258..9da1eaf530 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()); }