more custom command
This commit is contained in:
parent
f698e306a7
commit
61a3e4fb80
@ -496,7 +496,7 @@ void cmMakefile::AddCustomCommand(const char* source,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->AddCustomCommandToTarget(target, command, commandArgs,
|
this->AddCustomCommandToTarget(target, command, commandArgs,
|
||||||
cmTarget::POST_BUILD, comment);
|
cmTarget::POST_BUILD, comment, depends);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -618,6 +618,18 @@ AddCustomCommandToTarget(const char* target, const char* command,
|
|||||||
const std::vector<std::string>& commandArgs,
|
const std::vector<std::string>& commandArgs,
|
||||||
cmTarget::CustomCommandType type,
|
cmTarget::CustomCommandType type,
|
||||||
const char *comment)
|
const char *comment)
|
||||||
|
{
|
||||||
|
std::vector<std::string> empty;
|
||||||
|
this->AddCustomCommandToTarget(target,command,commandArgs,type,
|
||||||
|
comment, empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
void cmMakefile::
|
||||||
|
AddCustomCommandToTarget(const char* target, const char* command,
|
||||||
|
const std::vector<std::string>& commandArgs,
|
||||||
|
cmTarget::CustomCommandType type,
|
||||||
|
const char *comment,
|
||||||
|
const std::vector<std::string>& depends)
|
||||||
{
|
{
|
||||||
// find the target,
|
// find the target,
|
||||||
if (m_Targets.find(target) != m_Targets.end())
|
if (m_Targets.find(target) != m_Targets.end())
|
||||||
@ -637,7 +649,7 @@ AddCustomCommandToTarget(const char* target, const char* command,
|
|||||||
combinedArgs += " ";
|
combinedArgs += " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCustomCommand cc(c.c_str(),combinedArgs.c_str());
|
cmCustomCommand cc(c.c_str(),combinedArgs.c_str(),depends,0);
|
||||||
if ( comment && comment[0] )
|
if ( comment && comment[0] )
|
||||||
{
|
{
|
||||||
cc.SetComment(comment);
|
cc.SetComment(comment);
|
||||||
|
@ -133,6 +133,12 @@ public:
|
|||||||
const std::vector<std::string>& commandArgs,
|
const std::vector<std::string>& commandArgs,
|
||||||
cmTarget::CustomCommandType type,
|
cmTarget::CustomCommandType type,
|
||||||
const char *comment = 0);
|
const char *comment = 0);
|
||||||
|
void AddCustomCommandToTarget(const char* target,
|
||||||
|
const char* command,
|
||||||
|
const std::vector<std::string>& commandArgs,
|
||||||
|
cmTarget::CustomCommandType type,
|
||||||
|
const char *comment,
|
||||||
|
const std::vector<std::string>& depends);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a custom command to the build.
|
* Add a custom command to the build.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user