mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
FindJava: Add support for OpenJDK early access builds
OpenJDK 9 early access builds use a version string of "9-ea", and locally built installations use "9-internal", neither of which is currently accepted by the FindJava macro. Map those versions to "1.9". If the final released version is "9.0" the version interpretation could be changed to match at that time.
This commit is contained in:
@@ -143,6 +143,9 @@ if(Java_JAVA_EXECUTABLE)
|
||||
if(var MATCHES "java version \"([0-9]+\\.[0-9]+\\.[0-9_.]+.*)\"")
|
||||
# This is most likely Sun / OpenJDK, or maybe GCJ-java compat layer
|
||||
set(Java_VERSION_STRING "${CMAKE_MATCH_1}")
|
||||
elseif(var MATCHES "openjdk version \"([0-9]+)-[a-z]+\"")
|
||||
# OpenJDK 9 early access builds or locally built
|
||||
set(Java_VERSION_STRING "1.${CMAKE_MATCH_1}.0")
|
||||
elseif(var MATCHES "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+)\"")
|
||||
# Kaffe style
|
||||
set(Java_VERSION_STRING "${CMAKE_MATCH_1}")
|
||||
|
||||
Reference in New Issue
Block a user