diff options
author | Brad King <brad.king@kitware.com> | 2020-07-09 10:49:15 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-09 10:49:22 (GMT) |
commit | 395ba3eb17ff26cd7bc5c7987508466fcabd5295 (patch) | |
tree | 53053e0cc452e5b0e1070d3428a716959855a931 | |
parent | 8c477d7c6137d7d1e33ca5d3e54a5087deb2ddc2 (diff) | |
parent | e8051b1f20d90cbefd672d1ba108362f9c55c2db (diff) | |
download | CMake-395ba3eb17ff26cd7bc5c7987508466fcabd5295.zip CMake-395ba3eb17ff26cd7bc5c7987508466fcabd5295.tar.gz CMake-395ba3eb17ff26cd7bc5c7987508466fcabd5295.tar.bz2 |
Merge topic 'FindJava-no-macos-stub'
e8051b1f20 FindJava: Update check to avoid accepting macOS stub 'java' as Java
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4993
-rw-r--r-- | Modules/FindJava.cmake | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake index 945df3c..9db740b 100644 --- a/Modules/FindJava.cmake +++ b/Modules/FindJava.cmake @@ -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() |