summaryrefslogtreecommitdiffstats
path: root/Source/cmAddCustomTargetCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAddCustomTargetCommand.cxx')
-rw-r--r--Source/cmAddCustomTargetCommand.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index edb787b..27dea98 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -166,6 +166,14 @@ bool cmAddCustomTargetCommand
}
}
+ // Convert working directory to a full path.
+ if(!working_directory.empty())
+ {
+ const char* build_dir = this->Makefile->GetCurrentOutputDirectory();
+ working_directory =
+ cmSystemTools::CollapseFullPath(working_directory.c_str(), build_dir);
+ }
+
// Add the utility target to the makefile.
bool escapeOldStyle = !verbatim;
cmTarget* target =