~ubuntu-branches/ubuntu/utopic/cmake/utopic

« back to all changes in this revision

Viewing changes to Source/cmGeneratorExpressionParser.cxx

  • Committer: Package Import Robot
  • Author(s): Harald Sitter
  • Date: 2013-10-10 12:54:39 UTC
  • mfrom: (1.14.7)
  • Revision ID: package-import@ubuntu.com-20131010125439-h0ahaj004on6oj92
Tags: 2.8.12-0ubuntu1
New upstream release LP: #1246701

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
  std::vector<std::vector<cmGeneratorExpressionToken>::const_iterator>
127
127
                                                            commaTokens;
128
128
  std::vector<cmGeneratorExpressionToken>::const_iterator colonToken;
 
129
 
 
130
  bool emptyParamTermination = false;
 
131
 
129
132
  if (this->it != this->Tokens.end() &&
130
133
      this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
131
134
    {
133
136
    parameters.resize(parameters.size() + 1);
134
137
    assert(this->it != this->Tokens.end());
135
138
    ++this->it;
 
139
    if(this->it == this->Tokens.end())
 
140
      {
 
141
      emptyParamTermination = true;
 
142
      }
136
143
 
137
144
    while (this->it != this->Tokens.end() &&
138
145
           this->it->TokenType == cmGeneratorExpressionToken::CommaSeparator)
141
148
      parameters.resize(parameters.size() + 1);
142
149
      assert(this->it != this->Tokens.end());
143
150
      ++this->it;
 
151
      if(this->it == this->Tokens.end())
 
152
        {
 
153
        emptyParamTermination = true;
 
154
        }
144
155
      }
145
156
    while (this->it != this->Tokens.end() &&
146
157
           this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
164
175
        parameters.resize(parameters.size() + 1);
165
176
        assert(this->it != this->Tokens.end());
166
177
        ++this->it;
 
178
        if(this->it == this->Tokens.end())
 
179
          {
 
180
          emptyParamTermination = true;
 
181
          }
167
182
        }
168
183
      while (this->it != this->Tokens.end() &&
169
184
             this->it->TokenType == cmGeneratorExpressionToken::ColonSeparator)
203
218
      assert(parameters.size() > commaTokens.size());
204
219
      for ( ; pit != pend; ++pit, ++commaIt)
205
220
        {
206
 
        extendResult(result, *pit);
 
221
        if (!pit->empty() && !emptyParamTermination)
 
222
          {
 
223
          extendResult(result, *pit);
 
224
          }
207
225
        if (commaIt != commaTokens.end())
208
226
          {
209
227
          extendText(result, *commaIt);