summaryrefslogtreecommitdiffstats
path: root/Modules/UseJava.cmake
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@sap.com>2018-04-25 13:00:12 (GMT)
committerBrad King <brad.king@kitware.com>2018-04-25 13:18:53 (GMT)
commit5482f485b8c3114d258c4cd1a379a6cd12921cb1 (patch)
tree426acb5e272f1d96f13e23e13817826113731fc8 /Modules/UseJava.cmake
parentfbe6cd1596bf280edd49aeb8f981f99d7cd8beb3 (diff)
downloadCMake-5482f485b8c3114d258c4cd1a379a6cd12921cb1.zip
CMake-5482f485b8c3114d258c4cd1a379a6cd12921cb1.tar.gz
CMake-5482f485b8c3114d258c4cd1a379a6cd12921cb1.tar.bz2
FindJava, FindJNI, UseJava: update for version 10 support
* new version format * new registry layout on Windows Fixes: #17938
Diffstat (limited to 'Modules/UseJava.cmake')
-rw-r--r--Modules/UseJava.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 939bd7b..d7b720e 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -384,7 +384,7 @@
# Create C header files from java classes. These files provide the connective glue
# that allow your Java and C code to interact.
#
-# This command will no longer be supported starting with version 1.10 of the JDK due
+# This command will no longer be supported starting with version 10 of the JDK due
# to the `suppression of javah tool <http://openjdk.java.net/jeps/313>`_.
# Command ``add_jar(GENERATE_NATIVE_HEADERS)`` must be used instead.
#
@@ -527,7 +527,7 @@ function(add_jar _TARGET_NAME)
if (_add_jar_GENERATE_NATIVE_HEADERS)
# Raise an error if JDK version is less than 1.8 because javac -h is not supported
# by earlier versions.
- if ("${Java_VERSION}" VERSION_LESS 1.8)
+ if (Java_VERSION VERSION_LESS 1.8)
message (FATAL_ERROR "ADD_JAR: GENERATE_NATIVE_HEADERS is not supported with this version of Java.")
endif()
cmake_parse_arguments (_add_jar_GENERATE_NATIVE_HEADERS "" "DESTINATION" "" ${_add_jar_GENERATE_NATIVE_HEADERS})
@@ -1312,10 +1312,10 @@ function(create_javadoc _target)
endfunction()
function (create_javah)
- if ("${Java_VERSION}" VERSION_GREATER_EQUAL 1.10)
+ if (Java_VERSION VERSION_GREATER_EQUAL 10)
message (FATAL_ERROR "create_javah: not supported with this Java version. Use add_jar(GENERATE_NATIVE_HEADERS) instead.")
- elseif ("${Java_VERSION}" VERSION_GREATER_EQUAL 1.8)
- message (DEPRECATION "create_javah: this command will no longer be supported starting with version 1.10 of JDK. Update your project by using command add_jar(GENERATE_NATIVE_HEADERS) instead.")
+ elseif (Java_VERSION VERSION_GREATER_EQUAL 1.8)
+ message (DEPRECATION "create_javah: this command will no longer be supported starting with version 10 of JDK. Update your project by using command add_jar(GENERATE_NATIVE_HEADERS) instead.")
endif()
cmake_parse_arguments(_create_javah