diff options
author | Brad King <brad.king@kitware.com> | 2014-11-19 21:15:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-11-19 21:15:43 (GMT) |
commit | 5ee198d76e1b33a596d6bca18bbed5ec363ca322 (patch) | |
tree | 2b49be916464372adbf06a2bae613b59931a66a9 | |
parent | bea609ac2a3101cf6e18bc1cd5d752a190d89ccc (diff) | |
parent | dd378258f1ea07c841f50a6df6a011265441b7e6 (diff) | |
download | CMake-5ee198d76e1b33a596d6bca18bbed5ec363ca322.zip CMake-5ee198d76e1b33a596d6bca18bbed5ec363ca322.tar.gz CMake-5ee198d76e1b33a596d6bca18bbed5ec363ca322.tar.bz2 |
Merge branch 'FindJava-no-osx-stub' into release
-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") |