mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-19 19:43:23 +08:00
cmGlobalNinjaGenerator: Use forward slashes in clang modmap format on Windows
Issue: #24611
This commit is contained in:
@@ -2639,7 +2639,13 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
|
|||||||
CxxModuleLocations locs;
|
CxxModuleLocations locs;
|
||||||
locs.RootDirectory = ".";
|
locs.RootDirectory = ".";
|
||||||
locs.PathForGenerator = [this](std::string path) -> std::string {
|
locs.PathForGenerator = [this](std::string path) -> std::string {
|
||||||
return this->ConvertToNinjaPath(path);
|
path = this->ConvertToNinjaPath(path);
|
||||||
|
# ifdef _WIN32
|
||||||
|
if (this->IsGCCOnWindows()) {
|
||||||
|
std::replace(path.begin(), path.end(), '\\', '/');
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
return path;
|
||||||
};
|
};
|
||||||
locs.BmiLocationForModule =
|
locs.BmiLocationForModule =
|
||||||
[&mod_files](std::string const& logical) -> cm::optional<std::string> {
|
[&mod_files](std::string const& logical) -> cm::optional<std::string> {
|
||||||
|
Reference in New Issue
Block a user