summaryrefslogtreecommitdiffstats
path: root/Source/cmListCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmListCommand.cxx')
-rw-r--r--Source/cmListCommand.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index 107dca9..8d1657d 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -254,14 +254,18 @@ bool cmListCommand::HandleAppendCommand(std::vector<std::string> const& args)
// expand the variable
std::string listString;
this->GetListString(listString, listName);
+
+ if(!listString.empty() && !args.empty())
+ {
+ listString += ";";
+ }
+ const char* sep = "";
size_t cc;
for ( cc = 2; cc < args.size(); ++ cc )
{
- if(!listString.empty())
- {
- listString += ";";
- }
+ listString += sep;
listString += args[cc];
+ sep = ";";
}
this->Makefile->AddDefinition(listName, listString.c_str());