diff options
author | Stefan BrĂ¼ns <stefan.bruens@rwth-aachen.de> | 2018-01-08 12:45:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-01-19 16:15:11 (GMT) |
commit | 3c08d2075fae7ef62838f18e1af5d398c6401572 (patch) | |
tree | 313966df93cf2e4d97242c917b92a7586a38c23e /Modules/FindJava.cmake | |
parent | 2c089d80de3945e4f08f13557d59e04cbc942a60 (diff) | |
download | CMake-3c08d2075fae7ef62838f18e1af5d398c6401572.zip CMake-3c08d2075fae7ef62838f18e1af5d398c6401572.tar.gz CMake-3c08d2075fae7ef62838f18e1af5d398c6401572.tar.bz2 |
FindJava: ignore javah for JDK 10, it has been removed
The standalone javah tool has been removed, header generation happens
during execution of javac. `javac -h` allows generation of headers
only. See http://openjdk.java.net/projects/jdk/10/ and
http://openjdk.java.net/jeps/313 for details.
Fixes: #17613
Diffstat (limited to 'Modules/FindJava.cmake')
-rw-r--r-- | Modules/FindJava.cmake | 34 |
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() |