summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-06-24 12:37:26 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-06-24 12:37:26 (GMT)
commita0039a00fa9c8c0b8c2699492602cd926027029c (patch)
tree3eb1b53539504d402fbc19e0f26bf0444bd434ac
parent5b9b141ee60bbac4ede94b159a7f8dd3896ccd82 (diff)
parentb41771dfeb0eef25e35da7d3dca13de658a2f8fb (diff)
downloadCMake-a0039a00fa9c8c0b8c2699492602cd926027029c.zip
CMake-a0039a00fa9c8c0b8c2699492602cd926027029c.tar.gz
CMake-a0039a00fa9c8c0b8c2699492602cd926027029c.tar.bz2
Merge topic 'document-add_jar-compat-shims'
b41771d UseJava.cmake: document add_jar compat shim
-rw-r--r--Modules/UseJava.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 9c23127..0242b24 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -221,6 +221,13 @@ set(_JAVA_SYMLINK_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/UseJavaSymlinks.cmake)
function(add_jar _TARGET_NAME)
+ # 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
+ # initialize values of the named arguments. (Giving the corresponding named
+ # argument will override the value set here.)
+ #
+ # New features should use named arguments only.
if(DEFINED CMAKE_JAVA_TARGET_VERSION)
set(_add_jar_VERSION "${CMAKE_JAVA_TARGET_VERSION}")
endif()