2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2001-01-11 22:55:47 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2001-01-11 22:55:47 +03:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2000-08-29 23:26:29 +04:00
|
|
|
#include "cmMakeDepend.h"
|
2000-09-12 13:30:35 +04:00
|
|
|
#include "cmSystemTools.h"
|
2012-10-15 12:27:42 +04:00
|
|
|
#include "cmGeneratorExpression.h"
|
2000-08-29 23:26:29 +04:00
|
|
|
|
2003-06-23 22:10:12 +04:00
|
|
|
#include <cmsys/RegularExpression.hxx>
|
2014-01-04 09:47:13 +04:00
|
|
|
#include <cmsys/FStream.hxx>
|
2001-07-17 23:09:16 +04:00
|
|
|
|
|
|
|
void cmDependInformation::AddDependencies(cmDependInformation* info)
|
|
|
|
{
|
|
|
|
if(this != info)
|
|
|
|
{
|
2006-03-15 19:02:08 +03:00
|
|
|
this->DependencySet.insert(info);
|
2001-07-17 23:09:16 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-08-29 23:26:29 +04:00
|
|
|
cmMakeDepend::cmMakeDepend()
|
|
|
|
{
|
2006-03-15 19:02:08 +03:00
|
|
|
this->Verbose = false;
|
|
|
|
this->IncludeFileRegularExpression.compile("^.*$");
|
|
|
|
this->ComplainFileRegularExpression.compile("^$");
|
2000-09-12 13:30:35 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-08-29 23:26:29 +04:00
|
|
|
cmMakeDepend::~cmMakeDepend()
|
2012-08-13 21:42:58 +04:00
|
|
|
{
|
2015-01-04 15:33:16 +03:00
|
|
|
cmDeleteAll(this->DependInformationMap);
|
2000-08-29 23:26:29 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Set the makefile that depends will be made from.
|
2001-04-25 17:37:57 +04:00
|
|
|
// The pointer is kept so the cmSourceFile array can
|
2000-09-12 13:30:35 +04:00
|
|
|
// be updated with the depend information in the cmMakefile.
|
2000-08-29 23:26:29 +04:00
|
|
|
|
2005-06-22 17:06:46 +04:00
|
|
|
void cmMakeDepend::SetMakefile(cmMakefile* makefile)
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
2006-03-15 19:02:08 +03:00
|
|
|
this->Makefile = makefile;
|
2001-03-16 02:09:16 +03:00
|
|
|
|
|
|
|
// Now extract the include file regular expression from the makefile.
|
2006-03-15 19:02:08 +03:00
|
|
|
this->IncludeFileRegularExpression.compile(
|
|
|
|
this->Makefile->IncludeFileRegularExpression.c_str());
|
|
|
|
this->ComplainFileRegularExpression.compile(
|
|
|
|
this->Makefile->ComplainFileRegularExpression.c_str());
|
2011-11-05 19:17:49 +04:00
|
|
|
|
|
|
|
// Now extract any include paths from the targets
|
2012-02-22 16:23:06 +04:00
|
|
|
std::set<std::string> uniqueIncludes;
|
|
|
|
std::vector<std::string> orderedAndUniqueIncludes;
|
2012-10-15 12:27:42 +04:00
|
|
|
cmTargets &targets = this->Makefile->GetTargets();
|
|
|
|
for (cmTargets::iterator l = targets.begin();
|
2012-09-16 12:03:42 +04:00
|
|
|
l != targets.end(); ++l)
|
2000-09-12 13:30:35 +04:00
|
|
|
{
|
2012-10-15 12:27:42 +04:00
|
|
|
const char *incDirProp = l->second.GetProperty("INCLUDE_DIRECTORIES");
|
|
|
|
if (!incDirProp)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string incDirs = cmGeneratorExpression::Preprocess(incDirProp,
|
|
|
|
cmGeneratorExpression::StripAllGeneratorExpressions);
|
|
|
|
|
|
|
|
std::vector<std::string> includes;
|
2014-03-11 03:04:11 +04:00
|
|
|
cmSystemTools::ExpandListArgument(incDirs, includes);
|
2012-10-15 12:27:42 +04:00
|
|
|
|
2011-11-05 19:17:49 +04:00
|
|
|
for(std::vector<std::string>::const_iterator j = includes.begin();
|
|
|
|
j != includes.end(); ++j)
|
|
|
|
{
|
|
|
|
std::string path = *j;
|
|
|
|
this->Makefile->ExpandVariablesInString(path);
|
2012-02-22 16:23:06 +04:00
|
|
|
if(uniqueIncludes.insert(path).second)
|
|
|
|
{
|
|
|
|
orderedAndUniqueIncludes.push_back(path);
|
|
|
|
}
|
2011-11-05 19:17:49 +04:00
|
|
|
}
|
2000-09-12 13:30:35 +04:00
|
|
|
}
|
2012-02-22 16:23:06 +04:00
|
|
|
|
|
|
|
for(std::vector<std::string>::const_iterator
|
|
|
|
it = orderedAndUniqueIncludes.begin();
|
|
|
|
it != orderedAndUniqueIncludes.end();
|
|
|
|
++it)
|
|
|
|
{
|
2014-03-11 03:04:11 +04:00
|
|
|
this->AddSearchPath(*it);
|
2012-02-22 16:23:06 +04:00
|
|
|
}
|
2000-08-29 23:26:29 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2001-07-17 23:09:16 +04:00
|
|
|
const cmDependInformation* cmMakeDepend::FindDependencies(const char* file)
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
2002-09-10 23:37:28 +04:00
|
|
|
cmDependInformation* info = this->GetDependInformation(file,0);
|
2001-07-17 23:09:16 +04:00
|
|
|
this->GenerateDependInformation(info);
|
|
|
|
return info;
|
2001-06-12 17:00:21 +04:00
|
|
|
}
|
|
|
|
|
2001-07-17 23:09:16 +04:00
|
|
|
void cmMakeDepend::GenerateDependInformation(cmDependInformation* info)
|
2001-06-12 17:00:21 +04:00
|
|
|
{
|
2001-07-17 23:09:16 +04:00
|
|
|
// If dependencies are already done, stop now.
|
2006-03-15 19:02:08 +03:00
|
|
|
if(info->DependDone)
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
2001-07-17 23:09:16 +04:00
|
|
|
return;
|
2000-08-29 23:26:29 +04:00
|
|
|
}
|
2001-07-17 23:09:16 +04:00
|
|
|
else
|
2001-06-12 17:00:21 +04:00
|
|
|
{
|
2001-07-17 23:09:16 +04:00
|
|
|
// Make sure we don't visit the same file more than once.
|
2006-03-15 19:02:08 +03:00
|
|
|
info->DependDone = true;
|
2001-06-12 17:00:21 +04:00
|
|
|
}
|
2006-03-15 19:02:08 +03:00
|
|
|
const char* path = info->FullPath.c_str();
|
2000-08-29 23:26:29 +04:00
|
|
|
if(!path)
|
|
|
|
{
|
2006-03-10 21:06:26 +03:00
|
|
|
cmSystemTools::Error(
|
|
|
|
"Attempt to find dependencies for file without path!");
|
2000-08-29 23:26:29 +04:00
|
|
|
return;
|
|
|
|
}
|
2001-07-17 23:09:16 +04:00
|
|
|
|
2001-11-12 23:37:38 +03:00
|
|
|
bool found = false;
|
2001-11-16 17:03:31 +03:00
|
|
|
|
2001-03-09 00:12:16 +03:00
|
|
|
// If the file exists, use it to find dependency information.
|
2007-12-15 04:31:27 +03:00
|
|
|
if(cmSystemTools::FileExists(path, true))
|
2001-03-09 00:12:16 +03:00
|
|
|
{
|
|
|
|
// Use the real file to find its dependencies.
|
2001-07-17 23:09:16 +04:00
|
|
|
this->DependWalk(info);
|
2001-11-12 23:37:38 +03:00
|
|
|
found = true;
|
2001-03-09 00:12:16 +03:00
|
|
|
}
|
2001-11-16 17:03:31 +03:00
|
|
|
|
2006-03-10 21:06:26 +03:00
|
|
|
|
2001-11-12 23:37:38 +03:00
|
|
|
// See if the cmSourceFile for it has any files specified as
|
|
|
|
// dependency hints.
|
2006-03-15 19:38:47 +03:00
|
|
|
if(info->SourceFile != 0)
|
2001-03-09 00:12:16 +03:00
|
|
|
{
|
2001-11-16 17:03:31 +03:00
|
|
|
|
2001-04-25 17:37:57 +04:00
|
|
|
// Get the cmSourceFile corresponding to this.
|
2006-03-15 19:38:47 +03:00
|
|
|
const cmSourceFile& cFile = *(info->SourceFile);
|
2001-03-09 00:12:16 +03:00
|
|
|
// See if there are any hints for finding dependencies for the missing
|
|
|
|
// file.
|
2001-04-25 00:49:12 +04:00
|
|
|
if(!cFile.GetDepends().empty())
|
2001-03-09 00:12:16 +03:00
|
|
|
{
|
2001-11-12 23:37:38 +03:00
|
|
|
// Dependency hints have been given. Use them to begin the
|
2001-03-09 00:12:16 +03:00
|
|
|
// recursion.
|
2001-06-12 17:00:21 +04:00
|
|
|
for(std::vector<std::string>::const_iterator file =
|
2006-03-10 21:06:26 +03:00
|
|
|
cFile.GetDepends().begin(); file != cFile.GetDepends().end();
|
2001-04-25 00:49:12 +04:00
|
|
|
++file)
|
2001-03-09 00:12:16 +03:00
|
|
|
{
|
|
|
|
this->AddDependency(info, file->c_str());
|
|
|
|
}
|
2006-03-10 21:06:26 +03:00
|
|
|
|
2001-03-09 00:12:16 +03:00
|
|
|
// Found dependency information. We are done.
|
2001-11-12 23:37:38 +03:00
|
|
|
found = true;
|
2001-04-16 20:31:56 +04:00
|
|
|
}
|
2001-03-09 00:12:16 +03:00
|
|
|
}
|
2001-11-16 17:03:31 +03:00
|
|
|
|
|
|
|
if(!found)
|
|
|
|
{
|
|
|
|
// Try to find the file amongst the sources
|
2006-03-15 19:02:08 +03:00
|
|
|
cmSourceFile *srcFile = this->Makefile->GetSource
|
2014-03-11 03:04:11 +04:00
|
|
|
(cmSystemTools::GetFilenameWithoutExtension(path));
|
2002-06-27 23:57:09 +04:00
|
|
|
if (srcFile)
|
2001-11-16 17:03:31 +03:00
|
|
|
{
|
2002-06-27 23:57:09 +04:00
|
|
|
if (srcFile->GetFullPath() == path)
|
2001-11-16 17:03:31 +03:00
|
|
|
{
|
2002-06-27 23:57:09 +04:00
|
|
|
found=true;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
//try to guess which include path to use
|
2012-08-13 21:42:58 +04:00
|
|
|
for(std::vector<std::string>::iterator t =
|
2006-03-15 19:02:08 +03:00
|
|
|
this->IncludeDirectories.begin();
|
|
|
|
t != this->IncludeDirectories.end(); ++t)
|
2002-06-27 23:57:09 +04:00
|
|
|
{
|
|
|
|
std::string incpath = *t;
|
2002-11-06 19:20:12 +03:00
|
|
|
if (incpath.size() && incpath[incpath.size() - 1] != '/')
|
|
|
|
{
|
|
|
|
incpath = incpath + "/";
|
|
|
|
}
|
2002-06-27 23:57:09 +04:00
|
|
|
incpath = incpath + path;
|
|
|
|
if (srcFile->GetFullPath() == incpath)
|
2001-11-16 17:03:31 +03:00
|
|
|
{
|
2002-06-27 23:57:09 +04:00
|
|
|
// set the path to the guessed path
|
2012-08-13 21:42:58 +04:00
|
|
|
info->FullPath = incpath;
|
2002-06-27 23:57:09 +04:00
|
|
|
found=true;
|
2001-11-16 17:03:31 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2006-03-10 21:06:26 +03:00
|
|
|
|
2001-11-12 23:37:38 +03:00
|
|
|
if(!found)
|
2001-06-21 23:02:52 +04:00
|
|
|
{
|
2001-11-12 23:37:38 +03:00
|
|
|
// Couldn't find any dependency information.
|
2006-03-15 19:02:08 +03:00
|
|
|
if(this->ComplainFileRegularExpression.find(info->IncludeName.c_str()))
|
2001-11-12 23:37:38 +03:00
|
|
|
{
|
|
|
|
cmSystemTools::Error("error cannot find dependencies for ", path);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Destroy the name of the file so that it won't be output as a
|
|
|
|
// dependency.
|
2006-03-15 19:02:08 +03:00
|
|
|
info->FullPath = "";
|
2001-11-12 23:37:38 +03:00
|
|
|
}
|
2001-06-21 23:02:52 +04:00
|
|
|
}
|
2001-03-09 00:12:16 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// This function actually reads the file specified and scans it for
|
|
|
|
// #include directives
|
2001-07-17 23:09:16 +04:00
|
|
|
void cmMakeDepend::DependWalk(cmDependInformation* info)
|
2001-03-09 00:12:16 +03:00
|
|
|
{
|
2006-03-15 19:02:08 +03:00
|
|
|
cmsys::RegularExpression includeLine
|
|
|
|
("^[ \t]*#[ \t]*include[ \t]*[<\"]([^\">]+)[\">]");
|
2014-01-04 09:47:13 +04:00
|
|
|
cmsys::ifstream fin(info->FullPath.c_str());
|
2000-08-29 23:26:29 +04:00
|
|
|
if(!fin)
|
|
|
|
{
|
2006-03-15 19:02:08 +03:00
|
|
|
cmSystemTools::Error("Cannot open ", info->FullPath.c_str());
|
2000-08-29 23:26:29 +04:00
|
|
|
return;
|
|
|
|
}
|
2001-07-17 23:09:16 +04:00
|
|
|
|
|
|
|
// TODO: Write real read loop (see cmSystemTools::CopyFile).
|
2003-03-27 20:24:30 +03:00
|
|
|
std::string line;
|
|
|
|
while( cmSystemTools::GetLineFromStream(fin, line) )
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
2003-03-27 20:24:30 +03:00
|
|
|
if(includeLine.find(line.c_str()))
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
|
|
|
// extract the file being included
|
2001-06-21 23:02:52 +04:00
|
|
|
std::string includeFile = includeLine.match(1);
|
2000-08-29 23:26:29 +04:00
|
|
|
// see if the include matches the regular expression
|
2006-03-15 19:02:08 +03:00
|
|
|
if(!this->IncludeFileRegularExpression.find(includeFile))
|
2002-10-24 02:03:27 +04:00
|
|
|
{
|
2006-03-15 19:02:08 +03:00
|
|
|
if(this->Verbose)
|
2002-10-24 02:03:27 +04:00
|
|
|
{
|
2001-01-05 19:41:20 +03:00
|
|
|
std::string message = "Skipping ";
|
|
|
|
message += includeFile;
|
|
|
|
message += " for file ";
|
2006-03-15 19:02:08 +03:00
|
|
|
message += info->FullPath.c_str();
|
2002-10-24 02:03:27 +04:00
|
|
|
cmSystemTools::Error(message.c_str(), 0);
|
|
|
|
}
|
|
|
|
continue;
|
|
|
|
}
|
2006-03-10 21:06:26 +03:00
|
|
|
|
2001-03-09 00:12:16 +03:00
|
|
|
// Add this file and all its dependencies.
|
|
|
|
this->AddDependency(info, includeFile.c_str());
|
2000-08-29 23:26:29 +04:00
|
|
|
}
|
|
|
|
}
|
2001-03-09 00:12:16 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void cmMakeDepend::AddDependency(cmDependInformation* info, const char* file)
|
|
|
|
{
|
2012-08-13 21:42:58 +04:00
|
|
|
cmDependInformation* dependInfo =
|
2006-03-15 19:02:08 +03:00
|
|
|
this->GetDependInformation(file, info->PathOnly.c_str());
|
2001-07-17 23:09:16 +04:00
|
|
|
this->GenerateDependInformation(dependInfo);
|
|
|
|
info->AddDependencies(dependInfo);
|
2000-08-29 23:26:29 +04:00
|
|
|
}
|
|
|
|
|
2002-06-10 22:19:09 +04:00
|
|
|
cmDependInformation* cmMakeDepend::GetDependInformation(const char* file,
|
|
|
|
const char *extraPath)
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
2001-07-17 23:09:16 +04:00
|
|
|
// Get the full path for the file so that lookup is unambiguous.
|
2002-06-10 22:19:09 +04:00
|
|
|
std::string fullPath = this->FullPath(file, extraPath);
|
2006-03-10 21:06:26 +03:00
|
|
|
|
2001-07-17 23:09:16 +04:00
|
|
|
// Try to find the file's instance of cmDependInformation.
|
2006-03-15 19:02:08 +03:00
|
|
|
DependInformationMapType::const_iterator result =
|
|
|
|
this->DependInformationMap.find(fullPath);
|
|
|
|
if(result != this->DependInformationMap.end())
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
2001-07-17 23:09:16 +04:00
|
|
|
// Found an instance, return it.
|
|
|
|
return result->second;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Didn't find an instance. Create a new one and save it.
|
|
|
|
cmDependInformation* info = new cmDependInformation;
|
2006-03-15 19:02:08 +03:00
|
|
|
info->FullPath = fullPath;
|
2014-03-11 03:04:11 +04:00
|
|
|
info->PathOnly = cmSystemTools::GetFilenamePath(fullPath);
|
2006-03-15 19:02:08 +03:00
|
|
|
info->IncludeName = file;
|
|
|
|
this->DependInformationMap[fullPath] = info;
|
2001-07-17 23:09:16 +04:00
|
|
|
return info;
|
2000-08-29 23:26:29 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-03-15 19:02:08 +03:00
|
|
|
// find the full path to fname by searching the this->IncludeDirectories array
|
2002-06-10 22:19:09 +04:00
|
|
|
std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath)
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
2006-03-15 19:02:08 +03:00
|
|
|
DirectoryToFileToPathMapType::iterator m;
|
2003-07-29 02:12:23 +04:00
|
|
|
if(extraPath)
|
|
|
|
{
|
2006-03-15 19:02:08 +03:00
|
|
|
m = this->DirectoryToFileToPathMap.find(extraPath);
|
2003-07-29 02:12:23 +04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-03-15 19:02:08 +03:00
|
|
|
m = this->DirectoryToFileToPathMap.find("");
|
2003-07-29 02:12:23 +04:00
|
|
|
}
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2006-03-15 19:02:08 +03:00
|
|
|
if(m != this->DirectoryToFileToPathMap.end())
|
2003-07-29 02:12:23 +04:00
|
|
|
{
|
2006-03-15 19:02:08 +03:00
|
|
|
FileToPathMapType& map = m->second;
|
|
|
|
FileToPathMapType::iterator p = map.find(fname);
|
2003-07-29 02:12:23 +04:00
|
|
|
if(p != map.end())
|
|
|
|
{
|
|
|
|
return p->second;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-12-15 04:31:27 +03:00
|
|
|
if(cmSystemTools::FileExists(fname, true))
|
2000-11-22 19:02:30 +03:00
|
|
|
{
|
2003-07-29 02:12:23 +04:00
|
|
|
std::string fp = cmSystemTools::CollapseFullPath(fname);
|
2006-03-15 19:02:08 +03:00
|
|
|
this->DirectoryToFileToPathMap[extraPath? extraPath: ""][fname] = fp;
|
2003-07-29 02:12:23 +04:00
|
|
|
return fp;
|
2000-11-22 19:02:30 +03:00
|
|
|
}
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2006-03-15 19:02:08 +03:00
|
|
|
for(std::vector<std::string>::iterator i = this->IncludeDirectories.begin();
|
|
|
|
i != this->IncludeDirectories.end(); ++i)
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
|
|
|
std::string path = *i;
|
2002-11-06 19:20:12 +03:00
|
|
|
if (path.size() && path[path.size() - 1] != '/')
|
|
|
|
{
|
|
|
|
path = path + "/";
|
|
|
|
}
|
2000-08-29 23:26:29 +04:00
|
|
|
path = path + fname;
|
2007-12-15 04:31:27 +03:00
|
|
|
if(cmSystemTools::FileExists(path.c_str(), true)
|
2014-10-15 16:54:05 +04:00
|
|
|
&& !cmSystemTools::FileIsDirectory(path))
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
2014-10-15 16:54:05 +04:00
|
|
|
std::string fp = cmSystemTools::CollapseFullPath(path);
|
2006-03-15 19:02:08 +03:00
|
|
|
this->DirectoryToFileToPathMap[extraPath? extraPath: ""][fname] = fp;
|
2003-07-29 02:12:23 +04:00
|
|
|
return fp;
|
2000-08-29 23:26:29 +04:00
|
|
|
}
|
|
|
|
}
|
2001-04-25 17:37:57 +04:00
|
|
|
|
2002-06-10 22:19:09 +04:00
|
|
|
if (extraPath)
|
|
|
|
{
|
|
|
|
std::string path = extraPath;
|
2002-11-06 19:20:12 +03:00
|
|
|
if (path.size() && path[path.size() - 1] != '/')
|
|
|
|
{
|
|
|
|
path = path + "/";
|
|
|
|
}
|
2002-06-10 22:19:09 +04:00
|
|
|
path = path + fname;
|
2007-12-15 04:31:27 +03:00
|
|
|
if(cmSystemTools::FileExists(path.c_str(), true)
|
2014-10-15 16:54:05 +04:00
|
|
|
&& !cmSystemTools::FileIsDirectory(path))
|
2002-06-10 22:19:09 +04:00
|
|
|
{
|
2014-10-15 16:54:05 +04:00
|
|
|
std::string fp = cmSystemTools::CollapseFullPath(path);
|
2006-03-15 19:02:08 +03:00
|
|
|
this->DirectoryToFileToPathMap[extraPath][fname] = fp;
|
2003-07-29 02:12:23 +04:00
|
|
|
return fp;
|
2002-06-10 22:19:09 +04:00
|
|
|
}
|
|
|
|
}
|
2006-03-10 21:06:26 +03:00
|
|
|
|
2001-06-21 23:02:52 +04:00
|
|
|
// Couldn't find the file.
|
2000-08-29 23:26:29 +04:00
|
|
|
return std::string(fname);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Add a directory to the search path
|
2014-02-08 00:45:11 +04:00
|
|
|
void cmMakeDepend::AddSearchPath(const std::string& path)
|
2000-08-29 23:26:29 +04:00
|
|
|
{
|
2006-03-15 19:02:08 +03:00
|
|
|
this->IncludeDirectories.push_back(path);
|
2000-08-29 23:26:29 +04:00
|
|
|
}
|