diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-01-16 16:37:23 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-01-19 12:17:14 (GMT) |
commit | b5c2163293c08e8e53203d86a069713e06874886 (patch) | |
tree | f3d6d249054fee14b6e0122bc021be958c59b3dd /Source/cmCustomCommandGenerator.cxx | |
parent | 5b9f7a5f285d648698068abe8eb238cd4dda7161 (diff) | |
download | CMake-b5c2163293c08e8e53203d86a069713e06874886.zip CMake-b5c2163293c08e8e53203d86a069713e06874886.tar.gz CMake-b5c2163293c08e8e53203d86a069713e06874886.tar.bz2 |
Ninja: add_custom_command(DEPFILE): Ensure dependencies consistency
Fixes: #21694
Diffstat (limited to 'Source/cmCustomCommandGenerator.cxx')
-rw-r--r-- | Source/cmCustomCommandGenerator.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx index c67497a..4329caf 100644 --- a/Source/cmCustomCommandGenerator.cxx +++ b/Source/cmCustomCommandGenerator.cxx @@ -200,6 +200,7 @@ cmCustomCommandGenerator::cmCustomCommandGenerator( argv.push_back(cmSystemTools::GetCMakeCommand()); argv.emplace_back("-E"); argv.emplace_back("cmake_transform_depfile"); + argv.push_back(this->LG->GetGlobalGenerator()->GetName()); switch (*this->LG->GetGlobalGenerator()->DepfileFormat()) { case cmDepfileFormat::GccDepfile: argv.emplace_back("gccdepfile"); @@ -208,15 +209,10 @@ cmCustomCommandGenerator::cmCustomCommandGenerator( argv.emplace_back("vstlog"); break; } - if (this->LG->GetCurrentBinaryDirectory() == - this->LG->GetBinaryDirectory()) { - argv.emplace_back("./"); - } else { - argv.push_back(cmStrCat(this->LG->MaybeConvertToRelativePath( - this->LG->GetBinaryDirectory(), - this->LG->GetCurrentBinaryDirectory()), - '/')); - } + argv.push_back(this->LG->GetSourceDirectory()); + argv.push_back(this->LG->GetCurrentSourceDirectory()); + argv.push_back(this->LG->GetBinaryDirectory()); + argv.push_back(this->LG->GetCurrentBinaryDirectory()); argv.push_back(this->GetFullDepfile()); argv.push_back(this->GetInternalDepfile()); |