[Cmake-commits] [cmake-commits] king committed cmMakefileLibraryTargetGenerator.cxx 1.62 1.63

cmake-commits at cmake.org cmake-commits at cmake.org
Mon Aug 4 11:37:21 EDT 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv19766/Source

Modified Files:
	cmMakefileLibraryTargetGenerator.cxx 
Log Message:
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.


Index: cmMakefileLibraryTargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefileLibraryTargetGenerator.cxx,v
retrieving revision 1.62
retrieving revision 1.63
diff -C 2 -d -r1.62 -r1.63
*** cmMakefileLibraryTargetGenerator.cxx	9 Jul 2008 14:09:46 -0000	1.62
--- cmMakefileLibraryTargetGenerator.cxx	4 Aug 2008 15:37:19 -0000	1.63
***************
*** 613,616 ****
--- 613,617 ----
  
    // For static libraries there might be archiving rules.
+   bool haveStaticLibraryRule = false;
    std::vector<std::string> archiveCreateCommands;
    std::vector<std::string> archiveAppendCommands;
***************
*** 619,622 ****
--- 620,625 ----
    if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
      {
+     haveStaticLibraryRule =
+       this->Makefile->GetDefinition(linkRuleVar)? true:false;
      std::string arCreateVar = "CMAKE_";
      arCreateVar += linkLanguage;
***************
*** 644,647 ****
--- 647,651 ----
    // Decide whether to use archiving rules.
    bool useArchiveRules =
+     !haveStaticLibraryRule &&
      !archiveCreateCommands.empty() && !archiveAppendCommands.empty();
    if(useArchiveRules)



More information about the Cmake-commits mailing list