[Cmake-commits] CMake branch, next, updated. v2.8.1-1371-gb998508

Brad King brad.king at kitware.com
Thu Jun 10 09:55:45 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  b998508ee607fd1b728c8f00eb502a99a4bc7be1 (commit)
       via  00477de1c92d94e78cebdaf6c29ff2847207f454 (commit)
       via  f9268c9c818dbf4aec3d7a8d6dd8fbea7da96021 (commit)
       via  87f0853941f09379f625ae96d67b15b9cb2ad51a (commit)
      from  f5a2de086ee863bfb49e6fed1b9db5fab00f22f2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b998508ee607fd1b728c8f00eb502a99a4bc7be1
commit b998508ee607fd1b728c8f00eb502a99a4bc7be1
Merge: f5a2de0 00477de
Author: Brad King <brad.king at kitware.com>
Date:   Thu Jun 10 09:51:30 2010 -0400

    Merge branch 'mingw-response-files' into next


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=00477de1c92d94e78cebdaf6c29ff2847207f454
commit 00477de1c92d94e78cebdaf6c29ff2847207f454
Author: Brad King <brad.king at kitware.com>
Date:   Thu Mar 11 09:03:53 2010 -0500

    Use response file for objects on MinGW and MSYS
    
    Windows command lines are limited to about 32K so we need to use
    response files for linking very large lists of object files.
    
    See issue #10401.

diff --git a/Modules/Platform/Windows-GNU-Fortran.cmake b/Modules/Platform/Windows-GNU-Fortran.cmake
index c66feed..8273a19 100644
--- a/Modules/Platform/Windows-GNU-Fortran.cmake
+++ b/Modules/Platform/Windows-GNU-Fortran.cmake
@@ -1,2 +1,3 @@
 include(Platform/Windows-GNU)
 __windows_compiler_gnu(Fortran)
+set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 0)
diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake
index 6d84940..af03841 100644
--- a/Modules/Platform/Windows-GNU.cmake
+++ b/Modules/Platform/Windows-GNU.cmake
@@ -68,6 +68,8 @@ macro(__windows_compiler_gnu lang)
   endif()
 
   set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") # No -fPIC on Windows
+  set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1)
+  set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-Wl,@")
 
   # Binary link rules.
   set(CMAKE_${lang}_CREATE_SHARED_MODULE

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f9268c9c818dbf4aec3d7a8d6dd8fbea7da96021
commit f9268c9c818dbf4aec3d7a8d6dd8fbea7da96021
Author: Brad King <brad.king at kitware.com>
Date:   Thu Mar 11 09:03:26 2010 -0500

    Use platform variable for response file flag
    
    Create platform variable "CMAKE_<LANG>_RESPONSE_FILE_LINK_FLAG" to
    specify an alternative to "@" for referencing response files.  It
    applies specifically to response files with linker options.
    
    See issue #10401.

diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index c6f9ba5..6957334 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -1314,6 +1314,8 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
                      cmProperty::VARIABLE,0,0);
   cm->DefineProperty("CMAKE_<LANG>_LINK_FLAGS",
                      cmProperty::VARIABLE,0,0);
+  cm->DefineProperty("CMAKE_<LANG>_RESPONSE_FILE_LINK_FLAG",
+                     cmProperty::VARIABLE,0,0);
   cm->DefineProperty("CMAKE_<LANG>_STANDARD_LIBRARIES",
                      cmProperty::VARIABLE,0,0);
   cm->DefineProperty("CMAKE_<LANG>_STANDARD_LIBRARIES_INIT",
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index e35e5a3..eae7101 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1620,6 +1620,17 @@ cmMakefileTargetGenerator
     std::vector<std::string> object_strings;
     this->WriteObjectsStrings(object_strings, responseFileLimit);
 
+    // Lookup the response file reference flag.
+    std::string responseFlagVar = "CMAKE_";
+    responseFlagVar += this->Target->GetLinkerLanguage(this->ConfigName);
+    responseFlagVar += "_RESPONSE_FILE_LINK_FLAG";
+    const char* responseFlag =
+      this->Makefile->GetDefinition(responseFlagVar.c_str());
+    if(!responseFlag)
+      {
+      responseFlag = "@";
+      }
+
     // Write a response file for each string.
     const char* sep = "";
     for(unsigned int i = 0; i < object_strings.size(); ++i)
@@ -1637,7 +1648,7 @@ cmMakefileTargetGenerator
       sep = " ";
 
       // Reference the response file.
-      buildObjs += "@";
+      buildObjs += responseFlag;
       buildObjs += this->Convert(objects_rsp.c_str(),
                                  cmLocalGenerator::NONE,
                                  cmLocalGenerator::SHELL);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=87f0853941f09379f625ae96d67b15b9cb2ad51a
commit 87f0853941f09379f625ae96d67b15b9cb2ad51a
Author: Brad King <brad.king at kitware.com>
Date:   Thu Mar 11 08:49:05 2010 -0500

    Use forward slashes for objects in response files
    
    Response files are parsed by tools, not by shells.  We teach
    cmLocalGenerator::Convert() a new "RESPONSE" output format and use it
    for objects listed in response files.  It does not do special slash or
    MSYS root translation like the "SHELL" format does.  This is necessary
    for GNU tools on Windows to understand response file content.
    
    See issue #10401.

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 851e34f..4156f32 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2247,6 +2247,10 @@ std::string cmLocalGenerator::ConvertToOutputFormat(const char* source,
       }
     result = this->EscapeForShell(result.c_str(), true, false);
     }
+  else if(output == RESPONSE)
+    {
+    result = this->EscapeForShell(result.c_str(), false, false);
+    }
   return result;
 }
 
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index becdfff..489b613 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -102,7 +102,7 @@ public:
    * path setting
    */
   enum RelativeRoot { NONE, FULL, HOME, START, HOME_OUTPUT, START_OUTPUT };
-  enum OutputFormat { UNCHANGED, MAKEFILE, SHELL };
+  enum OutputFormat { UNCHANGED, MAKEFILE, SHELL, RESPONSE };
   std::string ConvertToOutputFormat(const char* source, OutputFormat output);
   std::string Convert(const char* remote, RelativeRoot local,
                       OutputFormat output = UNCHANGED,
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index dd45950..e35e5a3 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1329,7 +1329,7 @@ public:
     this->NextObject =
       this->LocalGenerator->Convert(obj.c_str(),
                                     cmLocalGenerator::START_OUTPUT,
-                                    cmLocalGenerator::SHELL);
+                                    cmLocalGenerator::RESPONSE);
 
     // Roll over to next string if the limit will be exceeded.
     if(this->LengthLimit != std::string::npos &&

-----------------------------------------------------------------------

Summary of changes:
 Modules/Platform/Windows-GNU-Fortran.cmake |    1 +
 Modules/Platform/Windows-GNU.cmake         |    2 ++
 Source/cmDocumentVariables.cxx             |    2 ++
 Source/cmLocalGenerator.cxx                |    4 ++++
 Source/cmLocalGenerator.h                  |    2 +-
 Source/cmMakefileTargetGenerator.cxx       |   15 +++++++++++++--
 6 files changed, 23 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list