summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-08-31 19:58:58 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-08-31 19:58:58 (GMT)
commitd0a62ef975b1ff52e872ae260de82a42d0fd9fca (patch)
tree9e2c406b396ffa35280313985d3567981b48f79f /java
parent86e489b6abc9d5474a3f86b0afe019d467a51b93 (diff)
downloadhdf5-d0a62ef975b1ff52e872ae260de82a42d0fd9fca.zip
hdf5-d0a62ef975b1ff52e872ae260de82a42d0fd9fca.tar.gz
hdf5-d0a62ef975b1ff52e872ae260de82a42d0fd9fca.tar.bz2
Fix Java library location for testing
Diffstat (limited to 'java')
-rw-r--r--java/examples/datasets/CMakeLists.txt2
-rw-r--r--java/examples/datatypes/CMakeLists.txt2
-rw-r--r--java/examples/groups/CMakeLists.txt2
-rw-r--r--java/examples/intro/CMakeLists.txt2
-rw-r--r--java/src/jni/CMakeLists.txt14
-rw-r--r--java/test/CMakeLists.txt2
6 files changed, 6 insertions, 18 deletions
diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt
index 1375372..1b43d00 100644
--- a/java/examples/datasets/CMakeLists.txt
+++ b/java/examples/datasets/CMakeLists.txt
@@ -80,7 +80,7 @@ MACRO (ADD_H5_TEST resultfile resultcode)
-D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${resultfile}_JAR_FILE}"
-D "TEST_ARGS:STRING=${CMD_ARGS}${ARGN}"
-D "TEST_PROGRAM=examples.datasets.${resultfile}"
- -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}/${HDF_CFG_BUILD_TYPE}"
-D "TEST_FOLDER=${HDFJAVA_EXAMPLES_BINARY_DIR}"
-D "TEST_OUTPUT=datasets/${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt
index 4a8b2a4..beacd7a 100644
--- a/java/examples/datatypes/CMakeLists.txt
+++ b/java/examples/datatypes/CMakeLists.txt
@@ -65,7 +65,7 @@ MACRO (ADD_H5_TEST resultfile resultcode)
-D "TEST_PROGRAM=examples.datatypes.${resultfile}"
-D "TEST_ARGS:STRING=${CMD_ARGS}${ARGN}"
-D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${resultfile}_JAR_FILE}"
- -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}/${HDF_CFG_BUILD_TYPE}"
-D "TEST_FOLDER=${HDFJAVA_EXAMPLES_BINARY_DIR}"
-D "TEST_OUTPUT=datatypes/${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt
index 2c5d33b..d406cab 100644
--- a/java/examples/groups/CMakeLists.txt
+++ b/java/examples/groups/CMakeLists.txt
@@ -64,7 +64,7 @@ MACRO (ADD_H5_TEST resultfile resultcode)
-D "TEST_PROGRAM=examples.groups.${resultfile}"
-D "TEST_ARGS:STRING=${CMD_ARGS}${ARGN}"
-D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${resultfile}_JAR_FILE}"
- -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}/${HDF_CFG_BUILD_TYPE}"
-D "TEST_FOLDER=${HDFJAVA_EXAMPLES_BINARY_DIR}"
-D "TEST_OUTPUT=groups/${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt
index 8d56b86..8c9485f 100644
--- a/java/examples/intro/CMakeLists.txt
+++ b/java/examples/intro/CMakeLists.txt
@@ -66,7 +66,7 @@ MACRO (ADD_H5_TEST resultfile resultcode)
-D "TEST_PROGRAM=examples.intro.${resultfile}"
-D "TEST_ARGS:STRING=${CMD_ARGS}${ARGN}"
-D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${${resultfile}_JAR_FILE}"
- -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}/${HDF_CFG_BUILD_TYPE}"
-D "TEST_FOLDER=${HDFJAVA_EXAMPLES_BINARY_DIR}"
-D "TEST_OUTPUT=intro/${resultfile}.out"
-D "TEST_EXPECT=${resultcode}"
diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt
index a0228e1..7b95e0b 100644
--- a/java/src/jni/CMakeLists.txt
+++ b/java/src/jni/CMakeLists.txt
@@ -50,22 +50,10 @@ set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
add_library (${HDF5_JAVA_JNI_LIB_TARGET} SHARED ${HDF5_JAVA_JNI_CSRCS} ${HDF5_JAVA_JNI_CHDRS})
target_include_directories(${HDF5_JAVA_JNI_LIB_TARGET} PRIVATE ${HDF5_BINARY_DIR} ${HDF5_JAVA_JNI_SOURCE_DIR})
TARGET_C_PROPERTIES (${HDF5_JAVA_JNI_LIB_TARGET} SHARED)
-target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
+target_link_libraries (${HDF5_JAVA_JNI_LIB_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
set_target_properties (${HDF5_JAVA_JNI_LIB_TARGET} PROPERTIES FOLDER libraries/jni)
SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_JAVA_JNI_LIB_TARGET}")
H5_SET_LIB_OPTIONS (${HDF5_JAVA_JNI_LIB_TARGET} ${HDF5_JAVA_JNI_LIB_NAME} SHARED "JAVA")
-if (WIN32)
- get_filename_component (HDF5_JAVA_JNI_DLL_NAME ${HDF5_JAVA_JNI_LIB_TARGET} NAME_WE)
- set (HDF5_JAVA_JNI_DLL_NAME "${HDF5_JAVA_JNI_DLL_NAME}$<$<CONFIG:Debug>:_D>")
- # message (STATUS "HDF5_JAVA_JNI_DLL_NAME: ${HDF5_JAVA_JNI_DLL_NAME}")
- if (BUILD_TESTING)
- add_custom_target (HDF5_JAVA_JNI-Test-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${HDF5_JAVA_JNI_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${HDF5_JAVA_JNI_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
- COMMENT "Copying ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${HDF5_JAVA_JNI_DLL_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
- )
- add_dependencies (HDF5_JAVA_JNI-Test-Copy ${HDF5_JAVA_JNI_LIB_TARGET})
- endif ()
-endif ()
#-----------------------------------------------------------------------------
# Add Target(s) to CMake Install for import into other projects
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index b76f572..710a5e0 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -111,7 +111,7 @@ foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
-D "TEST_CLASSPATH:STRING=${CMAKE_JAVA_CLASSPATH}"
-D "TEST_ARGS:STRING=${CMD_ARGS}-ea;org.junit.runner.JUnitCore"
-D "TEST_PROGRAM=test.${test_file}"
- -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
+ -D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}/${HDF_CFG_BUILD_TYPE}"
-D "TEST_FOLDER=${HDF5_BINARY_DIR}/java/test"
-D "TEST_OUTPUT=JUnit-${test_file}.out"
# -D "TEST_LOG_LEVEL=trace"