summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-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
-rw-r--r--tools/CMakeLists.txt3
8 files changed, 8 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a99ba33..8a0a039 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -548,11 +548,11 @@ else ()
endif ()
include (${HDF_RESOURCES_DIR}/HDFCompilerFlags.cmake)
+set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${HDF_RESOURCES_EXT_DIR} ${CMAKE_MODULE_PATH})
#-----------------------------------------------------------------------------
# Option to Enable MPI Parallel
#-----------------------------------------------------------------------------
-set (CMAKE_MODULE_PATH ${HDF_RESOURCES_DIR} ${HDF_RESOURCES_EXT_DIR} ${CMAKE_MODULE_PATH})
option (HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF)
if (HDF5_ENABLE_PARALLEL)
find_package(MPI REQUIRED)
@@ -586,7 +586,7 @@ if (HDF5_ENABLE_PARALLEL)
set (LARGE_PARALLEL_IO OFF)
endif ()
else ()
- message (STATUS "Parallel libraries not found")
+ message (FATAL_ERROR "Parallel libraries not found")
endif ()
endif ()
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"
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 7d41c8f..400039e 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -1,9 +1,6 @@
cmake_minimum_required (VERSION 3.10)
project (HDF5_TOOLS C)
-# --------------------------------------------------------------------
-# If testing was NOT enabled, then we need to build the tools library
-# --------------------------------------------------------------------
add_subdirectory (lib)
#-- Add the test sources