summaryrefslogtreecommitdiffstats
path: root/Modules/Platform/Windows-GNU.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-04 18:25:42 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-05 18:07:41 (GMT)
commit489b1c23b9a880da0012427b60cce7b6f5ddaa27 (patch)
treeb2688130d3a3af8bd6bd9e3d230510508069afde /Modules/Platform/Windows-GNU.cmake
parent745caae6dddc9ab5c38a669adf3906f6e3484c80 (diff)
downloadCMake-489b1c23b9a880da0012427b60cce7b6f5ddaa27.zip
CMake-489b1c23b9a880da0012427b60cce7b6f5ddaa27.tar.gz
CMake-489b1c23b9a880da0012427b60cce7b6f5ddaa27.tar.bz2
Windows: Use response files to specify link libraries for GNU tools
Work around the command-line-length limit by using an @linklibs.rsp response file to pass the flags for link libraries. This allows very long lists of libraries to be used in addition to the existing support for passing object files via response file. Suggested-by: Peter Keuschnigg <peter.keuschnigg@pmu.ac.at>
Diffstat (limited to 'Modules/Platform/Windows-GNU.cmake')
-rw-r--r--Modules/Platform/Windows-GNU.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index 2bb7a20..5c5b360 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -87,6 +87,7 @@ macro(__windows_compiler_gnu lang)
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)
# We prefer "@" for response files but it is not supported by gcc 3.
@@ -103,7 +104,9 @@ macro(__windows_compiler_gnu lang)
endif()
# The GNU 3.x compilers do not support response files (only linkers).
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 0)
- elseif(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS)
+ # Link libraries are generated only for the front-end.
+ set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_LIBRARIES 0)
+ else()
# Use "@" to pass the response file to the front-end.
set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "@")
endif()