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:21 (GMT) |
commit | 8e71d199dc6e07164cb8e86e7217ac4004d44476 (patch) | |
tree | 63aa40e770d2164af94c11411259d2870d96bc92 | |
parent | e69c64a144c42ac1b5183241a6525b7ed0382c46 (diff) | |
parent | e8051b1f20d90cbefd672d1ba108362f9c55c2db (diff) | |
download | CMake-8e71d199dc6e07164cb8e86e7217ac4004d44476.zip CMake-8e71d199dc6e07164cb8e86e7217ac4004d44476.tar.gz CMake-8e71d199dc6e07164cb8e86e7217ac4004d44476.tar.bz2 |
Merge topic 'FindJava-no-macos-stub' into release-3.18
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() |