From 1ec6485c6a16c230bf29696ab8fd48eb5edbb78a Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 16 Apr 2014 08:05:59 -0400 Subject: [PATCH] Support duplicate object names in large archives (#14874) Generalize the change from commit 39d0ade0 (Windows-GNU: Support duplicate object names in large archives, 2014-04-14) to the default archive rules. These rules have used an incremental append approach since commit v2.8.0~1856 (Build large archives incrementally, 2008-08-04). Switch from "ar r" to "ar q" to be sure we always append objects instead of replacing them. --- Modules/CMakeCInformation.cmake | 4 ++-- Modules/CMakeCXXInformation.cmake | 4 ++-- Modules/CMakeFortranInformation.cmake | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index e0cce4553..332b26ee2 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -175,10 +175,10 @@ endif() # Create a static archive incrementally for large object file counts. # If CMAKE_C_CREATE_STATIC_LIBRARY is set it will override these. if(NOT DEFINED CMAKE_C_ARCHIVE_CREATE) - set(CMAKE_C_ARCHIVE_CREATE " cr ") + set(CMAKE_C_ARCHIVE_CREATE " cq ") endif() if(NOT DEFINED CMAKE_C_ARCHIVE_APPEND) - set(CMAKE_C_ARCHIVE_APPEND " r ") + set(CMAKE_C_ARCHIVE_APPEND " q ") endif() if(NOT DEFINED CMAKE_C_ARCHIVE_FINISH) set(CMAKE_C_ARCHIVE_FINISH " ") diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index 3010a4831..72b2857db 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -266,10 +266,10 @@ endif() # Create a static archive incrementally for large object file counts. # If CMAKE_CXX_CREATE_STATIC_LIBRARY is set it will override these. if(NOT DEFINED CMAKE_CXX_ARCHIVE_CREATE) - set(CMAKE_CXX_ARCHIVE_CREATE " cr ") + set(CMAKE_CXX_ARCHIVE_CREATE " cq ") endif() if(NOT DEFINED CMAKE_CXX_ARCHIVE_APPEND) - set(CMAKE_CXX_ARCHIVE_APPEND " r ") + set(CMAKE_CXX_ARCHIVE_APPEND " q ") endif() if(NOT DEFINED CMAKE_CXX_ARCHIVE_FINISH) set(CMAKE_CXX_ARCHIVE_FINISH " ") diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 080dc68fe..d6382078b 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -194,10 +194,10 @@ endif() # Create a static archive incrementally for large object file counts. # If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these. if(NOT DEFINED CMAKE_Fortran_ARCHIVE_CREATE) - set(CMAKE_Fortran_ARCHIVE_CREATE " cr ") + set(CMAKE_Fortran_ARCHIVE_CREATE " cq ") endif() if(NOT DEFINED CMAKE_Fortran_ARCHIVE_APPEND) - set(CMAKE_Fortran_ARCHIVE_APPEND " r ") + set(CMAKE_Fortran_ARCHIVE_APPEND " q ") endif() if(NOT DEFINED CMAKE_Fortran_ARCHIVE_FINISH) set(CMAKE_Fortran_ARCHIVE_FINISH " ")