~ubuntu-branches/ubuntu/jaunty/cmake/jaunty-security

« back to all changes in this revision

Viewing changes to Source/cmSetSourceFilesPropertiesCommand.cxx

  • Committer: Bazaar Package Importer
  • Author(s): A. Maitland Bottoms
  • Date: 2006-06-18 16:34:11 UTC
  • mfrom: (1.4.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060618163411-pi234s3v6jwlcmof
Tags: 2.4.2-1
* New upstream release (Closes: #338324)
* Put cmake .vim files into /usr/share/vim/addons/plugin/
  where they can be used. (Closes: #366663)
* Install cmake-mode.el so it can be used. (Closes: #366664)
* Ensure cmake FindKDE locates KDE libraries on Debian
  based distributions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
  Program:   CMake - Cross-Platform Makefile Generator
4
4
  Module:    $RCSfile: cmSetSourceFilesPropertiesCommand.cxx,v $
5
5
  Language:  C++
6
 
  Date:      $Date: 2004/02/22 18:14:59 $
7
 
  Version:   $Revision: 1.12 $
 
6
  Date:      $Date: 2006/03/29 14:10:22 $
 
7
  Version:   $Revision: 1.15 $
8
8
 
9
9
  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
10
10
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
11
11
 
12
 
     This software is distributed WITHOUT ANY WARRANTY; without even 
13
 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
 
12
     This software is distributed WITHOUT ANY WARRANTY; without even
 
13
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14
14
     PURPOSE.  See the above copyright notices for more information.
15
15
 
16
16
=========================================================================*/
63
63
      ++j;
64
64
      if(j == args.end())
65
65
        {
66
 
        this->SetError("called with incorrect number of arguments COMPILE_FLAGS with no flags");
 
66
        this->SetError("called with incorrect number of arguments "
 
67
          "COMPILE_FLAGS with no flags");
67
68
        return false;
68
69
        }
69
70
      propertyPairs.push_back(*j);
85
86
      {
86
87
      // now loop through the rest of the arguments, new style
87
88
      ++j;
 
89
      bool dontPush = false;
88
90
      while (j != args.end())
89
91
        {
90
92
        propertyPairs.push_back(*j);
96
98
            generated = true;
97
99
            }
98
100
          }
 
101
        else if(*j == "MACOSX_PACKAGE_LOCATION")
 
102
          {
 
103
          ++j;
 
104
          if(j == args.end())
 
105
            {
 
106
            this->SetError("called with incorrect number of arguments "
 
107
              "MACOSX_PACKAGE_LOCATION with no flags");
 
108
            return false;
 
109
            }
 
110
          propertyPairs.push_back(*j);
 
111
          propertyPairs.push_back("EXTRA_CONTENT");
 
112
          propertyPairs.push_back("1");
 
113
          propertyPairs.push_back("KEEP_EXTENSION");
 
114
          propertyPairs.push_back("1");
 
115
          propertyPairs.push_back("LANGUAGE");
 
116
          propertyPairs.push_back("MacOSX_Content");
 
117
          dontPush = true;
 
118
          }
99
119
        else
100
120
          {
101
121
          ++j;
105
125
          this->SetError("called with incorrect number of arguments.");
106
126
          return false;
107
127
          }
108
 
        propertyPairs.push_back(*j);
 
128
        if ( !dontPush )
 
129
          {
 
130
          propertyPairs.push_back(*j);
 
131
          }
109
132
        ++j;
 
133
        dontPush = false;
110
134
        }
111
135
      // break out of the loop because j is already == end
112
136
      break;
117
141
      }
118
142
    else
119
143
      {
120
 
      this->SetError("called with illegal arguments, maybe missing a PROPERTIES specifier?");
 
144
      this->SetError("called with illegal arguments, maybe missing a "
 
145
        "PROPERTIES specifier?");
121
146
      return false;
122
147
      }
123
148
    }
124
 
  
 
149
 
125
150
  // now loop over all the files
126
151
  int i;
127
152
  unsigned int k;
128
153
  for(i = 0; i < numFiles; ++i)
129
 
    {   
 
154
    {
130
155
    // get the source file
131
156
    cmSourceFile* sf =
132
 
      m_Makefile->GetOrCreateSource(args[i].c_str(), generated);
 
157
      this->Makefile->GetOrCreateSource(args[i].c_str(), generated);
133
158
    if(sf)
134
159
      {
135
160
      // now loop through all the props and set them