~ubuntu-branches/ubuntu/dapper/cmake/dapper

« back to all changes in this revision

Viewing changes to Source/cmOutputRequiredFilesCommand.cxx

  • Committer: Bazaar Package Importer
  • Author(s): A. Maitland Bottoms
  • Date: 2006-01-08 10:48:14 UTC
  • mfrom: (1.3.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060108104814-jmy1r2fydpohpc1g
Tags: 2.2.3-1
* New upstream release (Closes: #338324)
* support GNU/kFreeBSD in cmake (Closes: #340764)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
  Program:   CMake - Cross-Platform Makefile Generator
4
4
  Module:    $RCSfile: cmOutputRequiredFilesCommand.cxx,v $
5
5
  Language:  C++
6
 
  Date:      $Date: 2003/03/27 17:24:30 $
7
 
  Version:   $Revision: 1.10 $
 
6
  Date:      $Date: 2005/10/24 19:43:52 $
 
7
  Version:   $Revision: 1.10.8.1 $
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.
146
146
              }
147
147
            }
148
148
          }
 
149
        if (!found)
 
150
          {
 
151
          cxxFile = root + ".txx";
 
152
          if(cmSystemTools::FileExists(cxxFile.c_str()))
 
153
            {
 
154
            found = true;
 
155
            }
 
156
          for(std::vector<std::string>::iterator i = 
 
157
                m_IncludeDirectories.begin();
 
158
              i != m_IncludeDirectories.end(); ++i)
 
159
            {
 
160
            std::string path = *i;
 
161
            path = path + "/";
 
162
            path = path + cxxFile;
 
163
            if(cmSystemTools::FileExists(path.c_str()))
 
164
              {
 
165
              found = true;
 
166
              }
 
167
            }
 
168
          }
149
169
        if (found)
150
170
          {
151
171
          this->AddDependency(info, cxxFile.c_str());
178
198
{
179
199
  // add info to the visited set
180
200
  visited->insert(info);
181
 
  
182
201
  // now recurse with info's dependencies
183
202
  for(cmDependInformation::DependencySet::const_iterator d = 
184
203
        info->m_DependencySet.begin();
190
209
        {
191
210
        std::string tmp = (*d)->m_FullPath;
192
211
        std::string::size_type pos = tmp.rfind('.');
193
 
        if(pos != std::string::npos && tmp.substr(pos) == ".cxx")
 
212
        if(pos != std::string::npos && (tmp.substr(pos) != ".h"))
194
213
          {
195
214
          tmp = tmp.substr(0, pos);
196
215
          fprintf(fout,"%s\n",(*d)->m_FullPath.c_str());
213
232
  // compute the list of files
214
233
  cmLBDepend md;
215
234
  md.SetMakefile(m_Makefile);
216
 
 
 
235
  md.AddSearchPath(m_Makefile->GetStartDirectory());
217
236
  // find the depends for a file
218
237
  const cmDependInformation *info = md.FindDependencies(m_File.c_str());
219
238
  if (info)