Remove hack.
This commit is contained in:
parent
16977f33f2
commit
e0d02e10b5
|
@ -131,34 +131,6 @@ bool cmAddCustomCommandCommand::InitialPass(std::vector<std::string> const& args
|
||||||
outputs,
|
outputs,
|
||||||
target.c_str());
|
target.c_str());
|
||||||
|
|
||||||
|
|
||||||
// All this is a hack for now
|
|
||||||
int cc = outputs.size()-1;
|
|
||||||
while( cc >= 0 )
|
|
||||||
{
|
|
||||||
std::string fileName = outputs[cc];
|
|
||||||
|
|
||||||
std::string directory = cmSystemTools::GetFilenamePath(fileName);
|
|
||||||
if ( directory == std::string() )
|
|
||||||
{
|
|
||||||
directory = outDir;
|
|
||||||
}
|
|
||||||
fileName = cmSystemTools::GetFilenameName(fileName);
|
|
||||||
|
|
||||||
std::string::size_type pos = fileName.rfind(".");
|
|
||||||
fileName = fileName.substr(0, pos);
|
|
||||||
// Add the generated source to the package target's source list.
|
|
||||||
cmSourceFile file;
|
|
||||||
file.SetName(fileName.c_str(), directory.c_str(), "c", false);
|
|
||||||
m_Makefile->AddSource(file, target.c_str());
|
|
||||||
cc--;
|
|
||||||
}
|
|
||||||
if ( outputs.size() > 0 )
|
|
||||||
{
|
|
||||||
std::cout << "Target: " << target << std::endl;
|
|
||||||
m_Makefile->GetTargets()[target.c_str()].GetSourceLists().push_back(target);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue