ENH: update to new style MakeDepend
This commit is contained in:
parent
0b8dcaddd2
commit
a93038c52a
|
@ -27,6 +27,37 @@ cmITKWrapTclCommand::~cmITKWrapTclCommand()
|
||||||
delete m_MakeDepend;
|
delete m_MakeDepend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
cmITKWrapTclCommand::AddDependencies(cmDependInformation const *info,
|
||||||
|
std::vector<std::string>& depends,
|
||||||
|
std::set<cmDependInformation const*>& visited)
|
||||||
|
{
|
||||||
|
if(!info)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// add info to the visited set
|
||||||
|
visited.insert(info);
|
||||||
|
|
||||||
|
// add this dependency and the recurse
|
||||||
|
// now recurse with info's dependencies
|
||||||
|
for(cmDependInformation::DependencySet::const_iterator d =
|
||||||
|
info->m_DependencySet.begin();
|
||||||
|
d != info->m_DependencySet.end(); ++d)
|
||||||
|
{
|
||||||
|
if (visited.find(*d) == visited.end())
|
||||||
|
{
|
||||||
|
if((*d)->m_FullPath != "")
|
||||||
|
{
|
||||||
|
depends.push_back((*d)->m_FullPath);
|
||||||
|
}
|
||||||
|
this->AddDependencies(*d,depends,visited);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// cmITKWrapTclCommand
|
// cmITKWrapTclCommand
|
||||||
bool cmITKWrapTclCommand::InitialPass(std::vector<std::string> const& argsIn)
|
bool cmITKWrapTclCommand::InitialPass(std::vector<std::string> const& argsIn)
|
||||||
{
|
{
|
||||||
|
@ -154,17 +185,8 @@ bool cmITKWrapTclCommand::CreateCableRule(const char* configFile)
|
||||||
m_MakeDepend->FindDependencies(inFile.c_str());
|
m_MakeDepend->FindDependencies(inFile.c_str());
|
||||||
if (info)
|
if (info)
|
||||||
{
|
{
|
||||||
for(cmDependInformation::DependencySet::const_iterator d =
|
std::set<cmDependInformation const*> visited;
|
||||||
info->m_DependencySet.begin();
|
this->AddDependencies(info, depends, visited);
|
||||||
d != info->m_DependencySet.end(); ++d)
|
|
||||||
{
|
|
||||||
// Make sure the full path is given. If not, the dependency was
|
|
||||||
// not found.
|
|
||||||
if((*d)->m_FullPath != "")
|
|
||||||
{
|
|
||||||
depends.push_back((*d)->m_FullPath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> outputs;
|
std::vector<std::string> outputs;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "cmStandardIncludes.h"
|
#include "cmStandardIncludes.h"
|
||||||
#include "cmCommand.h"
|
#include "cmCommand.h"
|
||||||
|
class cmDependInformation;
|
||||||
class cmMakeDepend;
|
class cmMakeDepend;
|
||||||
|
|
||||||
/** \class cmITKWrapTclCommand
|
/** \class cmITKWrapTclCommand
|
||||||
|
@ -59,6 +59,9 @@ public:
|
||||||
|
|
||||||
cmTypeMacro(cmITKWrapTclCommand, cmCommand);
|
cmTypeMacro(cmITKWrapTclCommand, cmCommand);
|
||||||
protected:
|
protected:
|
||||||
|
void AddDependencies(cmDependInformation const*info,
|
||||||
|
std::vector<std::string>& depends,
|
||||||
|
std::set<cmDependInformation const*>& visited);
|
||||||
cmStdString m_TargetName;
|
cmStdString m_TargetName;
|
||||||
cmTarget* m_Target;
|
cmTarget* m_Target;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue