diff options
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 3 | ||||
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 2 |
2 files changed, 5 insertions, 0 deletions
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()); } |