summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-01-11 20:53:06 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-01-11 20:53:06 (GMT)
commitad543dcf09efe684f64f2ac9ec549bb5a3123540 (patch)
treef4ede9efe862cf3e7208a17e0c8fda7638b6125b /Modules
parent7decc70eead665f75872dcf0b95a088d3b307879 (diff)
parentc2d73c938abc726df985058aa771a5b1710d96f2 (diff)
downloadCMake-ad543dcf09efe684f64f2ac9ec549bb5a3123540.zip
CMake-ad543dcf09efe684f64f2ac9ec549bb5a3123540.tar.gz
CMake-ad543dcf09efe684f64f2ac9ec549bb5a3123540.tar.bz2
Merge topic 'archive-rule-variables'
c2d73c9 Allow platform files to set large archive rules (#11674)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCInformation.cmake12
-rw-r--r--Modules/CMakeCXXInformation.cmake12
-rw-r--r--Modules/CMakeFortranInformation.cmake12
3 files changed, 27 insertions, 9 deletions
diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake
index 86a824a..668119f 100644
--- a/Modules/CMakeCInformation.cmake
+++ b/Modules/CMakeCInformation.cmake
@@ -164,9 +164,15 @@ ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE)
# Create a static archive incrementally for large object file counts.
# If CMAKE_C_CREATE_STATIC_LIBRARY is set it will override these.
-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>")
+IF(NOT DEFINED CMAKE_C_ARCHIVE_CREATE)
+ SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+ENDIF()
+IF(NOT DEFINED CMAKE_C_ARCHIVE_APPEND)
+ SET(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
+ENDIF()
+IF(NOT DEFINED CMAKE_C_ARCHIVE_FINISH)
+ SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+ENDIF()
# compile a C file into an object file
IF(NOT CMAKE_C_COMPILE_OBJECT)
diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake
index 680f8fd..163a7ef 100644
--- a/Modules/CMakeCXXInformation.cmake
+++ b/Modules/CMakeCXXInformation.cmake
@@ -241,9 +241,15 @@ ENDIF(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
# Create a static archive incrementally for large object file counts.
# If CMAKE_CXX_CREATE_STATIC_LIBRARY is set it will override these.
-SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
-SET(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
-SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+IF(NOT DEFINED CMAKE_CXX_ARCHIVE_CREATE)
+ SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+ENDIF()
+IF(NOT DEFINED CMAKE_CXX_ARCHIVE_APPEND)
+ SET(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
+ENDIF()
+IF(NOT DEFINED CMAKE_CXX_ARCHIVE_FINISH)
+ SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+ENDIF()
# compile a C++ file into an object file
IF(NOT CMAKE_CXX_COMPILE_OBJECT)
diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake
index 1e9b4e0..d18353a 100644
--- a/Modules/CMakeFortranInformation.cmake
+++ b/Modules/CMakeFortranInformation.cmake
@@ -163,9 +163,15 @@ ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE)
# Create a static archive incrementally for large object file counts.
# If CMAKE_Fortran_CREATE_STATIC_LIBRARY is set it will override these.
-SET(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
-SET(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
-SET(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_CREATE)
+ SET(CMAKE_Fortran_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+ENDIF()
+IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_APPEND)
+ SET(CMAKE_Fortran_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
+ENDIF()
+IF(NOT DEFINED CMAKE_Fortran_ARCHIVE_FINISH)
+ SET(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
+ENDIF()
# compile a Fortran file into an object file
IF(NOT CMAKE_Fortran_COMPILE_OBJECT)