ENH: slightly modified version of Alex's relative path arguments for custom commands
This commit is contained in:
parent
6c0f018bef
commit
91730c6005
|
@ -117,13 +117,30 @@ bool cmAddCustomCommandCommand::InitialPass(std::vector<std::string> const& args
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
std::string filename;
|
||||||
switch (doing)
|
switch (doing)
|
||||||
{
|
{
|
||||||
case doing_source:
|
case doing_source:
|
||||||
source = copy;
|
case doing_output:
|
||||||
|
case doing_outputs:
|
||||||
|
if (!cmSystemTools::FileIsFullPath(copy.c_str()))
|
||||||
|
{
|
||||||
|
filename = m_Makefile->GetStartDirectory();
|
||||||
|
filename += "/";
|
||||||
|
}
|
||||||
|
filename += copy;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (doing)
|
||||||
|
{
|
||||||
|
case doing_source:
|
||||||
|
source = filename;
|
||||||
break;
|
break;
|
||||||
case doing_output:
|
case doing_output:
|
||||||
output = copy;
|
output = filename;
|
||||||
break;
|
break;
|
||||||
case doing_main_dependency:
|
case doing_main_dependency:
|
||||||
main_dependency = copy;
|
main_dependency = copy;
|
||||||
|
@ -138,7 +155,7 @@ bool cmAddCustomCommandCommand::InitialPass(std::vector<std::string> const& args
|
||||||
depends.push_back(copy);
|
depends.push_back(copy);
|
||||||
break;
|
break;
|
||||||
case doing_outputs:
|
case doing_outputs:
|
||||||
outputs.push_back(copy);
|
outputs.push_back(filename);
|
||||||
break;
|
break;
|
||||||
case doing_comment:
|
case doing_comment:
|
||||||
comment = copy;
|
comment = copy;
|
||||||
|
|
Loading…
Reference in New Issue