ENH: use correct args for test of java

This commit is contained in:
Bill Hoffman 2004-09-24 16:54:55 -04:00
parent 74b3924edd
commit dfd275b8f9
1 changed files with 1 additions and 1 deletions

View File

@ -659,7 +659,7 @@ IF(BUILD_TESTING)
INCLUDE(FindJava) INCLUDE(FindJava)
IF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE) IF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE)
EXEC_PROGRAM(${CMAKE_Java_COMPILER} -version OUTPUT_VARIABLE OUT) EXEC_PROGRAM(${JAVA_COMPILE} ARGS -version OUTPUT_VARIABLE OUT)
IF(OUT MATCHES "invalid flag") IF(OUT MATCHES "invalid flag")
MESSAGE("This java does not even know what version it is!") MESSAGE("This java does not even know what version it is!")
ELSE(OUT MATCHES "invalid flag") ELSE(OUT MATCHES "invalid flag")