[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3163-ga64811d

Brad King brad.king at kitware.com
Tue Jul 16 13:33:43 EDT 2013


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  a64811da3f71c8543cdfe3ee1fbedc925c6f1233 (commit)
       via  177c0516ce522a7ed279eed663e92acf3a373eb2 (commit)
      from  e715845e8bde526f432a92cb302a283401cf4d12 (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=a64811da3f71c8543cdfe3ee1fbedc925c6f1233
commit a64811da3f71c8543cdfe3ee1fbedc925c6f1233
Merge: e715845 177c051
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jul 16 13:33:35 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jul 16 13:33:35 2013 -0400

    Merge topic 'UseJava-response-file' into next
    
    177c051 UseJava: Pass sources to javac using response file (#13028)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=177c0516ce522a7ed279eed663e92acf3a373eb2
commit 177c0516ce522a7ed279eed663e92acf3a373eb2
Author:     Graham Markall <graham at opengamma.com>
AuthorDate: Tue Jul 16 12:11:51 2013 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Jul 16 13:29:00 2013 -0400

    UseJava: Pass sources to javac using response file (#13028)
    
    The command line string passed to javac can exceed the 8191-character
    limit on Windows when there are a large number of files to compile.
    To avoid this, the list of sources is written to a file which is then
    passed to javac as an argfile.  Spaces in paths are dealt with by
    enclosing each file in quotes, and separating files with a newline.

diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 0242b24..f518b14 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -190,6 +190,7 @@
 #
 
 #=============================================================================
+# Copyright 2013 OpenGamma Ltd. <graham at opengamma.com>
 # Copyright 2010-2011 Andreas schneider <asn at redhat.com>
 # Copyright 2010 Ben Boeckel <ben.boeckel at kitware.com>
 #
@@ -367,6 +368,11 @@ function(add_jar _TARGET_NAME)
     endif()
 
     if (_JAVA_COMPILE_FILES)
+        # Create the list of files to compile.
+        set(_JAVA_SOURCES_FILE ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_sources)
+        string(REPLACE ";" "\"\n\"" _JAVA_COMPILE_STRING "\"${_JAVA_COMPILE_FILES}\"")
+        file(WRITE ${_JAVA_SOURCES_FILE} ${_JAVA_COMPILE_STRING})
+
         # Compile the java files and create a list of class files
         add_custom_command(
             # NOTE: this command generates an artificial dependency file
@@ -375,7 +381,7 @@ function(add_jar _TARGET_NAME)
                 ${CMAKE_JAVA_COMPILE_FLAGS}
                 -classpath "${CMAKE_JAVA_INCLUDE_PATH_FINAL}"
                 -d ${CMAKE_JAVA_CLASS_OUTPUT_PATH}
-                ${_JAVA_COMPILE_FILES}
+                @${_JAVA_SOURCES_FILE}
             COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_compiled_${_TARGET_NAME}
             DEPENDS ${_JAVA_COMPILE_FILES} ${_JAVA_COMPILE_DEPENDS}
             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

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

Summary of changes:
 Modules/UseJava.cmake |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list