updated for new custom command

This commit is contained in:
Ken Martin 2003-06-05 14:37:35 -04:00
parent b1095dd2f0
commit d5d0f17e5c
1 changed files with 9 additions and 9 deletions

View File

@ -187,13 +187,8 @@ bool cmITKWrapTclCommand::CreateCableRule(const char* configFile)
this->AddDependencies(info, depends, visited); this->AddDependencies(info, depends, visited);
} }
std::vector<std::string> outputs; std::string output;
outputs.push_back(outDir+"/"+tclFile+".cxx"); output = outDir+"/"+tclFile+".cxx";
m_Makefile->AddCustomCommand(inFile.c_str(),
command.c_str(),
commandArgs, depends,
outputs, m_TargetName.c_str());
// Add the source to the makefile. // Add the source to the makefile.
cmSourceFile file; cmSourceFile file;
@ -202,10 +197,15 @@ bool cmITKWrapTclCommand::CreateCableRule(const char* configFile)
file.GetDepends().push_back(inFile.c_str()); file.GetDepends().push_back(inFile.c_str());
file.GetDepends().push_back("CableTclFacility/ctCalls.h"); file.GetDepends().push_back("CableTclFacility/ctCalls.h");
m_Makefile->AddSource(file); m_Makefile->AddSource(file);
m_Makefile->AddCustomCommandToOutput(output.c_str(),
command.c_str(),
commandArgs,
inFile.c_str(),
depends);
// Add the generated source to the package's source list. // Add the generated source to the package's source list.
std::string srcname = file.GetSourceName() + ".cxx"; m_Target->GetSourceLists().push_back(output);
m_Target->GetSourceLists().push_back(srcname);
return true; return true;
} }