summaryrefslogtreecommitdiffstats
path: root/java/test/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-07-23 21:21:47 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-07-23 21:21:47 (GMT)
commitd3fdcd8a680ad0f8b21304b35e8564b774a88ef0 (patch)
tree7eaf482abb38de0349b7844ed6f9e04de88f438d /java/test/CMakeLists.txt
parent6add0919d1dd737a7d9a2da25079d761a85f282e (diff)
parente19b0302cc38d1850ada7a00431511343cddc8a6 (diff)
downloadhdf5-d3fdcd8a680ad0f8b21304b35e8564b774a88ef0.zip
hdf5-d3fdcd8a680ad0f8b21304b35e8564b774a88ef0.tar.gz
hdf5-d3fdcd8a680ad0f8b21304b35e8564b774a88ef0.tar.bz2
Merge pull request #1807 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'e19b0302cc38d1850ada7a00431511343cddc8a6': (31 commits) HDFFV-10845 update note Correct format of drive check Use generator expr to get correct name HDFFV-10845 Allow mingw to find functionality HDFFV-10845 fix comment syntax HDFFV-10845 Windows drive can only goto Z HDFFV-10845 make flags private Correct java load library name access Correct syntax Fix typo Correct OUTPUT_NAME usage CMake generator expr cannot be used in get_property cmd HDFFV-1045 gcc static must be link flags HDFFV-10845 quote multiple strings in cmake link command HDFFV-10845 update mingw cmake changes Add missing target root path, check other export macro HDFFV-10845 skip test if CMake command doesn't support ignore EOL HDFFV-10845 copy files with windows EOL HDFFV-10845 separate test used by copy windows files HDFFV-10845 mingw needs special windows reference files ...
Diffstat (limited to 'java/test/CMakeLists.txt')
-rw-r--r--java/test/CMakeLists.txt11
1 files changed, 4 insertions, 7 deletions
diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt
index 05bfd8d..3298a47 100644
--- a/java/test/CMakeLists.txt
+++ b/java/test/CMakeLists.txt
@@ -82,17 +82,16 @@ HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/h5ex_g_iterate.orig" "${PROJECT_BINARY_
add_custom_target(${HDF5_JAVA_TEST_LIB_TARGET}_files ALL COMMENT "Copying files needed by ${HDF5_JAVA_TEST_LIB_TARGET} tests" DEPENDS ${${HDF5_JAVA_TEST_LIB_TARGET}_files_list})
-if (WIN32)
+if (WIN32 OR MINGW)
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ";")
else ()
set (CMAKE_JAVA_INCLUDE_FLAG_SEP ":")
endif ()
-get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY $<IF:$<CONFIG:Debug>,OUTPUT_NAME_DEBUG,OUTPUT_NAME_RELWITHDEBINFO>)
-set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name};")
+get_property (target_name TARGET ${HDF5_JAVA_JNI_LIB_TARGET} PROPERTY OUTPUT_NAME)
+set (CMD_ARGS "-Dhdf.hdf5lib.H5.loadLibraryName=${target_name}$<$<CONFIG:Debug>:${CMAKE_DEBUG_POSTFIX}>;")
foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
-
set (CMAKE_JAVA_CLASSPATH ".")
foreach (CMAKE_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH})
set (CMAKE_JAVA_CLASSPATH "${CMAKE_JAVA_CLASSPATH}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${CMAKE_INCLUDE_PATH}")
@@ -101,8 +100,7 @@ foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
add_test (
NAME JUnit-${test_file}-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
+ COMMAND ${CMAKE_COMMAND} -E remove
JUnit-${test_file}.out
JUnit-${test_file}.out.err
)
@@ -124,7 +122,6 @@ foreach (test_file ${HDF5_JAVA_TEST_SOURCES})
-D "TEST_REFERENCE=JUnit-${test_file}.txt"
-P "${HDF_RESOURCES_DIR}/jrunTest.cmake"
)
-
set_tests_properties (JUnit-${test_file} PROPERTIES
ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir2"
DEPENDS "JUnit-${test_file}-clearall-objects"