mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 18:51:05 -05:00
Handle relative WORKING_DIRECTORY in add_custom_(command|target)
This also fixes handling of trailing slashes in the directory name.
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user