summaryrefslogtreecommitdiffstats
path: root/Source/cmAddCustomCommandCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2005-07-08 15:51:21 (GMT)
committerKen Martin <ken.martin@kitware.com>2005-07-08 15:51:21 (GMT)
commit91730c600561f125ca8d1462abafcf006df5968e (patch)
treeb36b9fa50d3d15fa08893247310c9a6b657889c5 /Source/cmAddCustomCommandCommand.cxx
parent6c0f018bef47b5f15def57b973f9525244ac7a55 (diff)
downloadCMake-91730c600561f125ca8d1462abafcf006df5968e.zip
CMake-91730c600561f125ca8d1462abafcf006df5968e.tar.gz
CMake-91730c600561f125ca8d1462abafcf006df5968e.tar.bz2
ENH: slightly modified version of Alex's relative path arguments for custom commands
Diffstat (limited to 'Source/cmAddCustomCommandCommand.cxx')
-rw-r--r--Source/cmAddCustomCommandCommand.cxx61
1 files changed, 39 insertions, 22 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index 138d96f..a4905dd 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -117,36 +117,53 @@ bool cmAddCustomCommandCommand::InitialPass(std::vector<std::string> const& args
}
else
{
+ std::string filename;
switch (doing)
{
case doing_source:
- source = copy;
- break;
case doing_output:
- output = copy;
- break;
- case doing_main_dependency:
- main_dependency = copy;
- break;
- case doing_command:
- currentLine.push_back(copy);
- break;
- case doing_target:
- target = copy;
- break;
- case doing_depends:
- depends.push_back(copy);
- break;
case doing_outputs:
- outputs.push_back(copy);
- break;
- case doing_comment:
- comment = copy;
+ if (!cmSystemTools::FileIsFullPath(copy.c_str()))
+ {
+ filename = m_Makefile->GetStartDirectory();
+ filename += "/";
+ }
+ filename += copy;
break;
default:
- this->SetError("Wrong syntax. Unknown type of argument.");
- return false;
+ break;
}
+
+ switch (doing)
+ {
+ case doing_source:
+ source = filename;
+ break;
+ case doing_output:
+ output = filename;
+ break;
+ case doing_main_dependency:
+ main_dependency = copy;
+ break;
+ case doing_command:
+ currentLine.push_back(copy);
+ break;
+ case doing_target:
+ target = copy;
+ break;
+ case doing_depends:
+ depends.push_back(copy);
+ break;
+ case doing_outputs:
+ outputs.push_back(filename);
+ break;
+ case doing_comment:
+ comment = copy;
+ break;
+ default:
+ this->SetError("Wrong syntax. Unknown type of argument.");
+ return false;
+ }
}
}