From 5590625fa3d3e6261cc5c9e39e02a205b1ed8027 Mon Sep 17 00:00:00 2001 From: Peter Kuemmel Date: Tue, 12 Jun 2012 13:52:32 +0200 Subject: Ninja: use slashes for include dirs, so also slahes are in the .d files --- Source/cmGlobalNinjaGenerator.h | 3 +++ Source/cmNinjaTargetGenerator.cxx | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index b2c2aa8..54677bc 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -147,6 +147,9 @@ public: const cmNinjaDeps& targets, const std::string& comment = ""); + + static bool IsMinGW() { return UsingMinGW; } + public: /// Default constructor. cmGlobalNinjaGenerator(); diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 0e859b3..5c6a45d 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -154,6 +154,8 @@ cmNinjaTargetGenerator::ComputeFlagsForObject(cmSourceFile *source, language.c_str()); std::string includeFlags = this->LocalGenerator->GetIncludeFlags(includes, language.c_str(), false); + if(cmGlobalNinjaGenerator::IsMinGW()) + cmSystemTools::ReplaceString(includeFlags, "\\", "/"); this->LocalGenerator->AppendFlags(flags, includeFlags.c_str()); } -- cgit v0.12