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  a745e32037c7dfd326a0776decf3592686f8200c (commit)
       via  a21e8df0da0d43f8c678d4c07f731035d04c0e27 (commit)
      from  0beaa3508ad731dc0ca1b198b0a5a28b60e682ca (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=a745e32037c7dfd326a0776decf3592686f8200c
commit a745e32037c7dfd326a0776decf3592686f8200c
Merge: 0beaa35 a21e8df
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Fri Mar 20 10:49:32 2015 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Mar 20 10:49:32 2015 -0400

    Merge topic 'UseJava-fix-arg-parse' into next
    
    a21e8df0 UseJava: Fix add_jar argument parsing (#14655)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a21e8df0da0d43f8c678d4c07f731035d04c0e27
commit a21e8df0da0d43f8c678d4c07f731035d04c0e27
Author:     Mark Studenka <mstude...@perseus.co>
AuthorDate: Thu Mar 19 10:55:00 2015 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Mar 20 10:46:13 2015 -0400

    UseJava: Fix add_jar argument parsing (#14655)
    
    Since commit v2.8.11~63^2 (UseJava.cmake: require explicit request to
    include jars, 2013-03-26) the argument parsing always overrides the
    variable settings even if the corresponding arguments are not passed.
    Re-order logic to fix this.

diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 3a6acd8..5eb0ca8 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -340,6 +340,13 @@ set(_JAVA_SYMLINK_SCRIPT 
${CMAKE_CURRENT_LIST_DIR}/UseJavaSymlinks.cmake)
 
 function(add_jar _TARGET_NAME)
 
+    cmake_parse_arguments(_add_jar
+      ""
+      "VERSION;OUTPUT_DIR;OUTPUT_NAME;ENTRY_POINT;MANIFEST"
+      "SOURCES;INCLUDE_JARS"
+      ${ARGN}
+    )
+
     # In CMake < 2.8.12, add_jar used variables which were set prior to calling
     # add_jar for customizing the behavior of add_jar. In order to be backwards
     # compatible, check if any of those variables are set, and use them to
@@ -347,28 +354,21 @@ function(add_jar _TARGET_NAME)
     # argument will override the value set here.)
     #
     # New features should use named arguments only.
-    if(DEFINED CMAKE_JAVA_TARGET_VERSION)
+    if(NOT DEFINED _add_jar_VERSION AND DEFINED CMAKE_JAVA_TARGET_VERSION)
         set(_add_jar_VERSION "${CMAKE_JAVA_TARGET_VERSION}")
     endif()
-    if(DEFINED CMAKE_JAVA_TARGET_OUTPUT_DIR)
+    if(NOT DEFINED _add_jar_OUTPUT_DIR AND DEFINED 
CMAKE_JAVA_TARGET_OUTPUT_DIR)
         set(_add_jar_OUTPUT_DIR "${CMAKE_JAVA_TARGET_OUTPUT_DIR}")
     endif()
-    if(DEFINED CMAKE_JAVA_TARGET_OUTPUT_NAME)
+    if(NOT DEFINED _add_jar_OUTPUT_NAME AND DEFINED 
CMAKE_JAVA_TARGET_OUTPUT_NAME)
         set(_add_jar_OUTPUT_NAME "${CMAKE_JAVA_TARGET_OUTPUT_NAME}")
         # reset
         set(CMAKE_JAVA_TARGET_OUTPUT_NAME)
     endif()
-    if(DEFINED CMAKE_JAVA_JAR_ENTRY_POINT)
+    if(NOT DEFINED _add_jar_ENTRY_POINT AND DEFINED CMAKE_JAVA_JAR_ENTRY_POINT)
         set(_add_jar_ENTRY_POINT "${CMAKE_JAVA_JAR_ENTRY_POINT}")
     endif()
 
-    cmake_parse_arguments(_add_jar
-      ""
-      "VERSION;OUTPUT_DIR;OUTPUT_NAME;ENTRY_POINT;MANIFEST"
-      "SOURCES;INCLUDE_JARS"
-      ${ARGN}
-    )
-
     set(_JAVA_SOURCE_FILES ${_add_jar_SOURCES} ${_add_jar_UNPARSED_ARGUMENTS})
 
     if (NOT DEFINED _add_jar_OUTPUT_DIR)

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

Summary of changes:
 Modules/UseJava.cmake |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to