Merge topic 'FindJava-no-osx-stub'
dd378258
FindJava: Do not accept OS X stub 'java' as Java
This commit is contained in:
commit
3749ad49e3
|
@ -115,7 +115,10 @@ if(Java_JAVA_EXECUTABLE)
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||||
if( res )
|
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" )
|
message( FATAL_ERROR "Error executing java -version" )
|
||||||
else()
|
else()
|
||||||
message( STATUS "Warning, could not run java -version")
|
message( STATUS "Warning, could not run java -version")
|
||||||
|
|
Loading…
Reference in New Issue