randoop: fix version comparison for older cmake versions
@@ -8,7 +8,7 @@ if (Java_JAVAC_EXECUTABLE)
# on ubuntu/open jdk its called java 1.9.0
# therefore this workaround should work in all cases
# as 9.x.x > 1.8 and 1.8.x > 1.8 and 1.9.x > 1.8
-if (${Java_VERSION} VERSION_GREATER_EQUAL "1.8.0")
+if ((${Java_VERSION} VERSION_GREATER "1.8.0") OR (${Java_VERSION} VERSION_EQUAL "1.8.0"))
if (MAVEN_EXECUTABLE) # set by find_program
file (
MAKE_DIRECTORY libelektra4j
@@ -82,9 +82,9 @@ if (MAVEN_EXECUTABLE) # set by find_program
else (MAVEN_EXECUTABLE)
remove_binding (jna "Maven Executable not found, but required to build the jna bindings")
endif (MAVEN_EXECUTABLE)
-else (Java_VERSION VERSION_GREATER_EQUAL "1.8.0")
+else ((${Java_VERSION} VERSION_GREATER "1.8.0") OR (${Java_VERSION} VERSION_EQUAL "1.8.0"))
remove_binding (jna "At least Java 8 is required, but ${Java_VERSION_STRING} was found")
-endif (Java_VERSION VERSION_GREATER_EQUAL "1.8.0")
+endif ((${Java_VERSION} VERSION_GREATER "1.8.0") OR (${Java_VERSION} VERSION_EQUAL "1.8.0"))
else (Java_JAVAC_EXECUTABLE)
remove_binding (jna "javac (java compiler) not found, which is only included in a jdk")
endif (Java_JAVAC_EXECUTABLE)
