diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2019-10-01 10:40:35 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2019-10-02 12:47:11 (GMT) |
commit | 14ac253af716432d20380d155131fa6fd6d03400 (patch) | |
tree | 405f358cdab3a52cf9aba6e96183e2c362c0c91d /Tests/Java | |
parent | a1f78a481c8cbda1f0c8503c4d661c3c3ddf00a6 (diff) | |
download | CMake-14ac253af716432d20380d155131fa6fd6d03400.zip CMake-14ac253af716432d20380d155131fa6fd6d03400.tar.gz CMake-14ac253af716432d20380d155131fa6fd6d03400.tar.bz2 |
FindJava: tests clean-up
Diffstat (limited to 'Tests/Java')
-rw-r--r-- | Tests/Java/CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/Java/CMakeLists.txt b/Tests/Java/CMakeLists.txt index 0b8269b..aea4282 100644 --- a/Tests/Java/CMakeLists.txt +++ b/Tests/Java/CMakeLists.txt @@ -3,6 +3,8 @@ project(hello Java) cmake_minimum_required (VERSION 2.6) set(CMAKE_VERBOSE_MAKEFILE 1) +include(CTest) + find_package(Java COMPONENTS Development) include (UseJava) @@ -14,3 +16,10 @@ add_jar(hello2 @${CMAKE_CURRENT_BINARY_DIR}/java_fileslist) # use listing file to specify sources and specify output directory (issue #17316) add_jar(hello3 @${CMAKE_CURRENT_BINARY_DIR}/java_fileslist OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/hello3") + +add_test (NAME Java.Jar + COMMAND "${Java_JAVA_EXECUTABLE}" -classpath hello.jar HelloWorld) +add_test (NAME Java.JarSourceList + COMMAND "${Java_JAVA_EXECUTABLE}" -classpath hello2.jar HelloWorld) +add_test (NAME Java.JarSourceListAndOutput + COMMAND "${Java_JAVA_EXECUTABLE}" -classpath "${CMAKE_CURRENT_BINARY_DIR}/hello3/hello3.jar" HelloWorld) |