diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-09-24 20:34:20 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-09-24 20:34:20 (GMT) |
commit | 4b87fdada45d66e92e83eb84b270bdecb5235fcf (patch) | |
tree | 1425ae2af153c197d4679385be2077a3d65ea614 /Source/CMakeLists.txt | |
parent | 0a26f8d46cdcb7e39a2cf3d28f367f2e444272d3 (diff) | |
download | CMake-4b87fdada45d66e92e83eb84b270bdecb5235fcf.zip CMake-4b87fdada45d66e92e83eb84b270bdecb5235fcf.tar.gz CMake-4b87fdada45d66e92e83eb84b270bdecb5235fcf.tar.bz2 |
ENH: only use newer java for testing
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r-- | Source/CMakeLists.txt | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 003a358..23741e2 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -659,17 +659,21 @@ IF(BUILD_TESTING) INCLUDE(FindJava) IF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE) - ADD_TEST(Java ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/Java" - "${CMake_BINARY_DIR}/Tests/Java" - --build-generator ${CMAKE_GENERATOR} - --build-project hello - --build-makeprogram ${MAKEPROGRAM} - --build-two-config - --build-run-dir "${CMake_BINARY_DIR}/Tests/Java/" -# --test-command ${JAVA_RUNTIME} -classpath hello.jar HelloWorld) - --test-command ${JAVA_RUNTIME} HelloWorld) + EXEC_PROGRAM(${CMAKE_Java_COMPILER} -version OUTPUT_VARIABLE OUT) + IF(OUT MATCHES "invalid flag") + MESSAGE("This java does not even know what version it is!") + ELSE(OUT MATCHES "invalid flag") + ADD_TEST(Java ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/Java" + "${CMake_BINARY_DIR}/Tests/Java" + --build-generator ${CMAKE_GENERATOR} + --build-project hello + --build-makeprogram ${MAKEPROGRAM} + --build-two-config + --build-run-dir "${CMake_BINARY_DIR}/Tests/Java/" + --test-command ${JAVA_RUNTIME} -classpath hello.jar HelloWorld) + ENDIF(OUT MATCHES "invalid flag") ENDIF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE) ENDIF(CMAKE_GENERATOR MATCHES "Makefiles") |