From 00477de1c92d94e78cebdaf6c29ff2847207f454 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 11 Mar 2010 09:03:53 -0500 Subject: Use response file for objects on MinGW and MSYS Windows command lines are limited to about 32K so we need to use response files for linking very large lists of object files. See issue #10401. --- Modules/Platform/Windows-GNU-Fortran.cmake | 1 + Modules/Platform/Windows-GNU.cmake | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Modules/Platform/Windows-GNU-Fortran.cmake b/Modules/Platform/Windows-GNU-Fortran.cmake index c66feed..8273a19 100644 --- a/Modules/Platform/Windows-GNU-Fortran.cmake +++ b/Modules/Platform/Windows-GNU-Fortran.cmake @@ -1,2 +1,3 @@ include(Platform/Windows-GNU) __windows_compiler_gnu(Fortran) +set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 0) diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake index 6d84940..af03841 100644 --- a/Modules/Platform/Windows-GNU.cmake +++ b/Modules/Platform/Windows-GNU.cmake @@ -68,6 +68,8 @@ macro(__windows_compiler_gnu lang) endif() set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") # No -fPIC on Windows + set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1) + set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-Wl,@") # Binary link rules. set(CMAKE_${lang}_CREATE_SHARED_MODULE -- cgit v0.12