From c81f369d7bd35f3ad3f0b806aed0c4cba26f77d3 Mon Sep 17 00:00:00 2001
From: Thomas Herz <thomas.herz@kuka.com>
Date: Thu, 7 May 2015 00:48:03 +0200
Subject: [PATCH 2/2] Do not use newlines in response files when compiling with
 gcc on windows

Avoids problems with broken gcc versions which cannot handle windows newlines correctly
---
 Source/cmNinjaNormalTargetGenerator.cxx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 155a30e..0ff5d62 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -202,7 +202,12 @@ cmNinjaNormalTargetGenerator
         responseFlag += rspfile;
 
         // build response file content
-        rspcontent = "$in_newline $LINK_PATH $LINK_LIBRARIES";
+        if(cmGlobalNinjaGenerator::IsGCCOnWindows()) {
+          rspcontent = "$in";
+        } else {
+          rspcontent = "$in_newline";
+        }
+        rspcontent += " $LINK_PATH $LINK_LIBRARIES";
         vars.Objects = responseFlag.c_str();
         vars.LinkLibraries = "";
     }
-- 
1.9.4.msysgit.2

