mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Makefile: Pass includes response file using native path style
We already pass the objects and libraries response files to the linker
this way. In particular, this is needed when using `NMake Makefiles`
on Windows with a path to `clang++.exe` that is not a "short path":
>nmake -f slash.make
"C:\Program Files\LLVM\bin\clang++.exe" @CMakeFiles/slash.rsp
cannot not open file 'C:\...\CMakeFiles': is a directory
>nmake -f backslash.make
"C:\Program Files\LLVM\bin\clang++.exe" @CMakeFiles\backslash.rsp
This commit is contained in:
@@ -2329,9 +2329,12 @@ void cmMakefileTargetGenerator::AddIncludeFlags(std::string& flags,
|
||||
responseFlag = "@";
|
||||
}
|
||||
std::string const name = cmStrCat("includes_", lang, ".rsp");
|
||||
std::string const arg = std::move(responseFlag) +
|
||||
this->CreateResponseFile(name, includeFlags, this->FlagFileDepends[lang],
|
||||
lang);
|
||||
std::string const includes_rsp = this->CreateResponseFile(
|
||||
name, includeFlags, this->FlagFileDepends[lang], lang);
|
||||
std::string const arg =
|
||||
cmStrCat(std::move(responseFlag),
|
||||
this->LocalGenerator->ConvertToOutputFormat(
|
||||
includes_rsp, cmOutputConverter::SHELL));
|
||||
this->LocalGenerator->AppendFlags(flags, arg);
|
||||
} else {
|
||||
this->LocalGenerator->AppendFlags(flags, includeFlags);
|
||||
|
||||
Reference in New Issue
Block a user