mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-27 09:29:15 -05:00
cmLocalGenerator: move the CMakeFiles subdir from the target to output root
When target directories are shortened, the `CMakeFiles` path component will be part of the root, not the target directory. Since other files end up constructing paths manually, move the differing component into the correct logical path construction part.
This commit is contained in:
@@ -1150,11 +1150,13 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand(
|
||||
std::set<std::string> languages;
|
||||
target->GetLanguages(
|
||||
languages, this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
|
||||
auto langFileDir = cmSystemTools::GetFilenamePath(
|
||||
this->MaybeRelativeToCurBinDir(cleanfile));
|
||||
/* clang-format off */
|
||||
fout << "\n"
|
||||
"# Per-language clean rules from dependency scanning.\n"
|
||||
"foreach(lang " << cmJoin(languages, " ") << ")\n"
|
||||
" include(" << this->GetTargetDirectory(target)
|
||||
" include(" << langFileDir
|
||||
<< "/cmake_clean_${lang}.cmake OPTIONAL)\n"
|
||||
"endforeach()\n";
|
||||
/* clang-format on */
|
||||
|
||||
Reference in New Issue
Block a user