summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-08-31 18:29:36 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-08-31 18:29:36 (GMT)
commit05c5d40dd51bfe875a41df8a9d02b93f22e6bdfb (patch)
tree0c96ca0321a6cc597ed519487745ac5bbb227924
parent031088fc121870d04c736b5b06b86246544fb97f (diff)
downloadhdf5-05c5d40dd51bfe875a41df8a9d02b93f22e6bdfb.zip
hdf5-05c5d40dd51bfe875a41df8a9d02b93f22e6bdfb.tar.gz
hdf5-05c5d40dd51bfe875a41df8a9d02b93f22e6bdfb.tar.bz2
Cleanup and add intermediate dir for java
-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.txt12
-rw-r--r--java/test/CMakeLists.txt2
-rw-r--r--tools/CMakeLists.txt3
8 files changed, 7 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b76f332..6f87568 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..41c73ab 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_NAME}"
-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..5e4e885 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_NAME}"
-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..593eaea 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_NAME}"
-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..d9cab84 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_NAME}"
-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 009cdc9..7b95e0b 100644
--- a/java/src/jni/CMakeLists.txt
+++ b/java/src/jni/CMakeLists.txt
@@ -54,18 +54,6 @@ 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..5ef0ca3 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_NAME}"
-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