FindJava: Fix OpenJDK 8 version detection (#15565)

The openjdk-8 (8u45-b14-2) package on Debian unstable has extra
text after the version number components.  Match this and add it
to the reported version string.
This commit is contained in:
Felix Geyer 2015-05-12 13:45:43 -04:00 committed by Brad King
parent 53bb51fc31
commit 7953867ba4
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ if(Java_JAVA_EXECUTABLE)
elseif(var MATCHES "java full version \"kaffe-([0-9]+\\.[0-9]+\\.[0-9_]+)\"")
# Kaffe style
set(Java_VERSION_STRING "${CMAKE_MATCH_1}")
elseif(var MATCHES "openjdk version \"([0-9]+\\.[0-9]+\\.[0-9_]+)\"")
elseif(var MATCHES "openjdk version \"([0-9]+\\.[0-9]+\\.[0-9_]+.*)\"")
# OpenJDK ver 1.7.x on OpenBSD
set(Java_VERSION_STRING "${CMAKE_MATCH_1}")
else()