diff options
author | Brad King <brad.king@kitware.com> | 2008-08-04 15:37:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-08-04 15:37:19 (GMT) |
commit | aaa88d33a96c3006e7a862b9d60eaaac774890cd (patch) | |
tree | 3de0321a448c764eedb4a01ed1f87a0b5dcfeffd /Source/cmMakefileLibraryTargetGenerator.cxx | |
parent | 0c20967a6bda705ee5779483047b6ff3c3d58730 (diff) | |
download | CMake-aaa88d33a96c3006e7a862b9d60eaaac774890cd.zip CMake-aaa88d33a96c3006e7a862b9d60eaaac774890cd.tar.gz CMake-aaa88d33a96c3006e7a862b9d60eaaac774890cd.tar.bz2 |
ENH: Build large archives incrementally
Creation of archive libraries with the unix 'ar' tool should be done
incrementally when the number of object files is large. This avoids
problems with the command line getting too many arguments.
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileLibraryTargetGenerator.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 03b9622..7bd12a0 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -612,12 +612,15 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules } // For static libraries there might be archiving rules. + bool haveStaticLibraryRule = false; std::vector<std::string> archiveCreateCommands; std::vector<std::string> archiveAppendCommands; std::vector<std::string> archiveFinishCommands; std::string::size_type archiveCommandLimit = std::string::npos; if(this->Target->GetType() == cmTarget::STATIC_LIBRARY) { + haveStaticLibraryRule = + this->Makefile->GetDefinition(linkRuleVar)? true:false; std::string arCreateVar = "CMAKE_"; arCreateVar += linkLanguage; arCreateVar += "_ARCHIVE_CREATE"; @@ -643,6 +646,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules // Decide whether to use archiving rules. bool useArchiveRules = + !haveStaticLibraryRule && !archiveCreateCommands.empty() && !archiveAppendCommands.empty(); if(useArchiveRules) { |