summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-11-19 21:15:43 (GMT)
committerBrad King <brad.king@kitware.com>2014-11-19 21:15:43 (GMT)
commit5ee198d76e1b33a596d6bca18bbed5ec363ca322 (patch)
tree2b49be916464372adbf06a2bae613b59931a66a9
parentbea609ac2a3101cf6e18bc1cd5d752a190d89ccc (diff)
parentdd378258f1ea07c841f50a6df6a011265441b7e6 (diff)
downloadCMake-5ee198d76e1b33a596d6bca18bbed5ec363ca322.zip
CMake-5ee198d76e1b33a596d6bca18bbed5ec363ca322.tar.gz
CMake-5ee198d76e1b33a596d6bca18bbed5ec363ca322.tar.bz2
Merge branch 'FindJava-no-osx-stub' into release
-rw-r--r--Modules/FindJava.cmake5
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")