소스 검색

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.
Brad King 15 년 전
부모
커밋
00477de1c9
2개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Modules/Platform/Windows-GNU-Fortran.cmake
  2. 2 0
      Modules/Platform/Windows-GNU.cmake

+ 1 - 0
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)

+ 2 - 0
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