mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-26 00:00:39 -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:
@@ -286,6 +286,13 @@ bool cmAddCustomCommandCommand
|
||||
return false;
|
||||
}
|
||||
|
||||
// Convert working directory to a full path.
|
||||
if(!working.empty())
|
||||
{
|
||||
const char* build_dir = this->Makefile->GetCurrentOutputDirectory();
|
||||
working = cmSystemTools::CollapseFullPath(working.c_str(), build_dir);
|
||||
}
|
||||
|
||||
// Choose which mode of the command to use.
|
||||
bool escapeOldStyle = !verbatim;
|
||||
if(source.empty() && output.empty())
|
||||
|
||||
Reference in New Issue
Block a user