summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-30 01:46:25 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-30 01:46:25 (GMT)
commit66e0b4212fbbaaf3c5aa5af6a51aa3a5af002edf (patch)
tree6a18f76856cfe10f1e7be02d2b1cf41896a34cd6 /Modules
parent44cf465ff5f768c96e8708eba35f31f296e78b1e (diff)
downloadCMake-66e0b4212fbbaaf3c5aa5af6a51aa3a5af002edf.zip
CMake-66e0b4212fbbaaf3c5aa5af6a51aa3a5af002edf.tar.gz
CMake-66e0b4212fbbaaf3c5aa5af6a51aa3a5af002edf.tar.bz2
ENH: Added build rule variables CMAKE_<LANG>_ARCHIVE_CREATE, CMAKE_<LANG>_ARCHIVE_APPEND, and CMAKE_<LANG>_ARCHIVE_FINISH to support creation of static archive libraries out of a large number of objects. See bug #6284.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/Windows-gcc.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/Platform/Windows-gcc.cmake b/Modules/Platform/Windows-gcc.cmake
index 805b451..51857eb 100644
--- a/Modules/Platform/Windows-gcc.cmake
+++ b/Modules/Platform/Windows-gcc.cmake
@@ -53,3 +53,14 @@ IF(MSYS OR MINGW)
SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
ENDFOREACH(type)
ENDIF(MSYS OR MINGW)
+
+# Create archiving rules to support large object file lists for static
+# libraries.
+IF(MSYS OR MINGW)
+ SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+ SET(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
+ SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+ SET(CMAKE_CXX_ARCHIVE_CREATE ${CMAKE_C_ARCHIVE_CREATE})
+ SET(CMAKE_CXX_ARCHIVE_APPEND ${CMAKE_C_ARCHIVE_APPEND})
+ SET(CMAKE_CXX_ARCHIVE_FINISH ${CMAKE_C_ARCHIVE_FINISH})
+ENDIF(MSYS OR MINGW)