blob: 7eff96e78b6cfcf70260295977e76331c88253fe [file] [log] [blame]
From 58e33e70d9f0cb1b0e95597d865d17a31752af60 Mon Sep 17 00:00:00 2001
From: Alexpux <alexey.pawlow@gmail.com>
Date: Mon, 3 Aug 2015 22:00:16 +0100
Subject: [PATCH 1/4] Disable response files for MSYS Generator
---
Modules/Platform/Windows-GNU.cmake | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index a2e3811dd8..cb963dabe0 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -73,9 +73,11 @@ macro(__windows_compiler_gnu lang)
set(CMAKE_${lang}_LINK_OPTIONS_NO_PIE "")
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "")
- set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS ${__WINDOWS_GNU_LD_RESPONSE})
- set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_LIBRARIES ${__WINDOWS_GNU_LD_RESPONSE})
- set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 1)
+ if(NOT CMAKE_GENERATOR STREQUAL "MSYS Makefiles" OR CMAKE_NEED_RESPONSE)
+ set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS ${__WINDOWS_GNU_LD_RESPONSE})
+ set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_LIBRARIES ${__WINDOWS_GNU_LD_RESPONSE})
+ set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 1)
+ endif()
# We prefer "@" for response files but it is not supported by gcc 3.
execute_process(COMMAND ${CMAKE_${lang}_COMPILER} --version OUTPUT_VARIABLE _ver ERROR_VARIABLE _ver)
--
2.31.0.windows.1