diff options
author | Brad King <brad.king@kitware.com> | 2014-11-20 13:57:07 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-11-20 13:57:07 (GMT) |
commit | 3749ad49e3251dad7b392317a50ef3b1194ee63b (patch) | |
tree | 71774a879fe24c7224f63b164c6bba196234cfe1 /Modules/FindJava.cmake | |
parent | b6f6b0a983871d4eba677c3a760c0f72bb4404ce (diff) | |
parent | dd378258f1ea07c841f50a6df6a011265441b7e6 (diff) | |
download | CMake-3749ad49e3251dad7b392317a50ef3b1194ee63b.zip CMake-3749ad49e3251dad7b392317a50ef3b1194ee63b.tar.gz CMake-3749ad49e3251dad7b392317a50ef3b1194ee63b.tar.bz2 |
Merge topic 'FindJava-no-osx-stub'
dd378258 FindJava: Do not accept OS X stub 'java' as Java
Diffstat (limited to 'Modules/FindJava.cmake')
-rw-r--r-- | Modules/FindJava.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake index 79be34e..bb73853 100644 --- a/Modules/FindJava.cmake +++ b/Modules/FindJava.cmake @@ -115,7 +115,10 @@ if(Java_JAVA_EXECUTABLE) OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) if( res ) - if(${Java_FIND_REQUIRED}) + if(var MATCHES "No Java runtime present, requesting install") + set_property(CACHE Java_JAVA_EXECUTABLE + PROPERTY VALUE "Java_JAVA_EXECUTABLE-NOTFOUND") + elseif(${Java_FIND_REQUIRED}) message( FATAL_ERROR "Error executing java -version" ) else() message( STATUS "Warning, could not run java -version") |