Do not error out if the java version is not found, if java is not required.
This commit is contained in:
parent
70f9078780
commit
0da537d167
|
@ -82,7 +82,11 @@ IF(Java_JAVA_EXECUTABLE)
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||||
IF( res )
|
IF( res )
|
||||||
MESSAGE( FATAL_ERROR "Error executing java -version" )
|
IF(${Java_FIND_REQUIRED})
|
||||||
|
MESSAGE( FATAL_ERROR "Error executing java -version" )
|
||||||
|
ELSE()
|
||||||
|
MESSAGE( STATUS "Warning, could not run java --version")
|
||||||
|
ENDIF()
|
||||||
ELSE()
|
ELSE()
|
||||||
# extract major/minor version and patch level from "java -version" output
|
# extract major/minor version and patch level from "java -version" output
|
||||||
# Tested on linux using
|
# Tested on linux using
|
||||||
|
|
Loading…
Reference in New Issue