Commit 8e71d199 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'FindJava-no-macos-stub' into release-3.18

e8051b1f

 FindJava: Update check to avoid accepting macOS stub 'java' as Java
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !4993
parents e69c64a1 e8051b1f
......@@ -160,9 +160,8 @@ if(Java_JAVA_EXECUTABLE)
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE)
if( res )
if(var MATCHES "No Java runtime present, requesting install")
set_property(CACHE Java_JAVA_EXECUTABLE
PROPERTY VALUE "Java_JAVA_EXECUTABLE-NOTFOUND")
if(var MATCHES "Unable to locate a Java Runtime to invoke|No Java runtime present, requesting install")
set(Java_JAVA_EXECUTABLE Java_JAVA_EXECUTABLE-NOTFOUND)
elseif(${Java_FIND_REQUIRED})
message( FATAL_ERROR "Error executing java -version" )
else()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment