summaryrefslogtreecommitdiffstats
path: root/Tests/JavaJavah/CMakeLists.txt
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2019-10-01 10:40:35 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2019-10-02 12:47:11 (GMT)
commit14ac253af716432d20380d155131fa6fd6d03400 (patch)
tree405f358cdab3a52cf9aba6e96183e2c362c0c91d /Tests/JavaJavah/CMakeLists.txt
parenta1f78a481c8cbda1f0c8503c4d661c3c3ddf00a6 (diff)
downloadCMake-14ac253af716432d20380d155131fa6fd6d03400.zip
CMake-14ac253af716432d20380d155131fa6fd6d03400.tar.gz
CMake-14ac253af716432d20380d155131fa6fd6d03400.tar.bz2
FindJava: tests clean-up
Diffstat (limited to 'Tests/JavaJavah/CMakeLists.txt')
-rw-r--r--Tests/JavaJavah/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/JavaJavah/CMakeLists.txt b/Tests/JavaJavah/CMakeLists.txt
index 071bf20..77c292a 100644
--- a/Tests/JavaJavah/CMakeLists.txt
+++ b/Tests/JavaJavah/CMakeLists.txt
@@ -3,6 +3,8 @@ project(helloJavah Java CXX)
cmake_minimum_required (VERSION 2.6)
set(CMAKE_VERBOSE_MAKEFILE 1)
+include(CTest)
+
find_package(Java COMPONENTS Development)
include (UseJava)
@@ -21,3 +23,6 @@ add_dependencies(B B_javah)
target_include_directories(B PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
${JAVA_INCLUDE_PATH}
${JAVA_INCLUDE_PATH2})
+
+add_test (NAME Java.Javah
+ COMMAND "${Java_JAVA_EXECUTABLE}" -Djava.library.path=$<TARGET_FILE_DIR:B> -classpath hello3.jar HelloWorld2)