summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Geyer <debfx@ubuntu.com>2015-05-12 17:45:43 (GMT)
committerBrad King <brad.king@kitware.com>2015-05-12 17:46:12 (GMT)
commit7953867ba46223dfab373ce58cff0a4bc20c3864 (patch)
tree4864d09527c3997f44d5e01b0e769640dc89e400
parent53bb51fc31ddfbc7c62598db1abdef3a1cdd45e7 (diff)
downloadCMake-7953867ba46223dfab373ce58cff0a4bc20c3864.zip
CMake-7953867ba46223dfab373ce58cff0a4bc20c3864.tar.gz
CMake-7953867ba46223dfab373ce58cff0a4bc20c3864.tar.bz2
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.
-rw-r--r--Modules/FindJava.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index bb73853..9e43174 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -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()