summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-22 15:18:10 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-01-22 15:18:15 (GMT)
commitc81ace7ab7e5e325fef9339ed3ea05abbd0f8be4 (patch)
tree9bbd2d4b3577b7d5c11053305b3b06dfbbd773fd /Modules
parent2a9614039ed7b9f9c5d28922131aef51c530d70a (diff)
parent3c08d2075fae7ef62838f18e1af5d398c6401572 (diff)
downloadCMake-c81ace7ab7e5e325fef9339ed3ea05abbd0f8be4.zip
CMake-c81ace7ab7e5e325fef9339ed3ea05abbd0f8be4.tar.gz
CMake-c81ace7ab7e5e325fef9339ed3ea05abbd0f8be4.tar.bz2
Merge topic 'FindJava-jdk-10'
3c08d207 FindJava: ignore javah for JDK 10, it has been removed Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1637
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindJava.cmake34
1 files changed, 25 insertions, 9 deletions
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index b913e17..e3f5af6 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -237,10 +237,18 @@ if(Java_FIND_COMPONENTS)
endif()
elseif(component STREQUAL "Development")
list(APPEND _JAVA_REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAVAC_EXECUTABLE
- Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE)
- if(Java_JAVA_EXECUTABLE AND Java_JAVAC_EXECUTABLE
- AND Java_JAVAH_EXECUTABLE AND Java_JAVADOC_EXECUTABLE)
- set(Java_Development_FOUND TRUE)
+ Java_JAVADOC_EXECUTABLE)
+ if(Java_VERSION VERSION_LESS "1.10")
+ list(APPEND _JAVA_REQUIRED_VARS Java_JAVAH_EXECUTABLE)
+ if(Java_JAVA_EXECUTABLE AND Java_JAVAC_EXECUTABLE
+ AND Java_JAVAH_EXECUTABLE AND Java_JAVADOC_EXECUTABLE)
+ set(Java_Development_FOUND TRUE)
+ endif()
+ else()
+ if(Java_JAVA_EXECUTABLE AND Java_JAVAC_EXECUTABLE
+ AND Java_JAVADOC_EXECUTABLE)
+ set(Java_Development_FOUND TRUE)
+ endif()
endif()
elseif(component STREQUAL "IdlJ")
list(APPEND _JAVA_REQUIRED_VARS Java_IDLJ_EXECUTABLE)
@@ -268,11 +276,19 @@ if(Java_FIND_COMPONENTS)
endif()
else()
# Check for Development
- find_package_handle_standard_args(Java
- REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE
- Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE
- VERSION_VAR Java_VERSION_STRING
- )
+ if(Java_VERSION VERSION_LESS "1.10")
+ find_package_handle_standard_args(Java
+ REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE
+ Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE
+ VERSION_VAR Java_VERSION_STRING
+ )
+ else()
+ find_package_handle_standard_args(Java
+ REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE
+ Java_JAVADOC_EXECUTABLE
+ VERSION_VAR Java_VERSION_STRING
+ )
+ endif()
endif()