diff options
Diffstat (limited to 'Tests/JavaJavah/CMakeLists.txt')
-rw-r--r-- | Tests/JavaJavah/CMakeLists.txt | 5 |
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) |