summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-06-18 12:46:25 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-06-18 12:46:25 (GMT)
commite7f16c6f2c7b031d7e9b4ba22a9fcdad4d258360 (patch)
tree18f277bcdb333d7091c598c39b70e4a2e3b50cd0 /testpar
parentf73a190d2c2e2bfe80508599e0d76d62c358ae68 (diff)
downloadhdf5-e7f16c6f2c7b031d7e9b4ba22a9fcdad4d258360.zip
hdf5-e7f16c6f2c7b031d7e9b4ba22a9fcdad4d258360.tar.gz
hdf5-e7f16c6f2c7b031d7e9b4ba22a9fcdad4d258360.tar.bz2
HDFFV-10805 Add option to only build shared targets
HDFFV-10805 Add ONLY_SHARED_LIBS option and prefer shared over static HDFFV-10803 Update FindSZIP.cmake find module Remove unneeded modules and update java modules
Diffstat (limited to 'testpar')
-rw-r--r--testpar/CMakeLists.txt34
-rw-r--r--testpar/CMakeTests.cmake3
-rw-r--r--testpar/CMakeVFDTests.cmake4
3 files changed, 27 insertions, 14 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 96ce0c0..1aecef6 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -22,24 +22,38 @@ set (testphdf5_SOURCES
#-- Adding test for testhdf5
add_executable (testphdf5 ${testphdf5_SOURCES})
-target_include_directories(testphdf5
+target_include_directories (testphdf5
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
)
-TARGET_C_PROPERTIES (testphdf5 STATIC)
-target_link_libraries (testphdf5
- PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
-)
+if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (testphdf5 STATIC)
+ target_link_libraries (testphdf5
+ PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ )
+else ()
+ TARGET_C_PROPERTIES (testphdf5 SHARED)
+ target_link_libraries (testphdf5
+ PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ )
+endif ()
set_target_properties (testphdf5 PROPERTIES FOLDER test/par)
MACRO (ADD_H5P_EXE file)
add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
- target_include_directories(${file}
+ target_include_directories (${file}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
)
- TARGET_C_PROPERTIES (${file} STATIC)
- target_link_libraries (${file}
- PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
- )
+ if (NOT BUILD_SHARED_LIBS)
+ TARGET_C_PROPERTIES (${file} STATIC)
+ target_link_libraries (${file}
+ PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ )
+ else ()
+ TARGET_C_PROPERTIES (${file} SHARED)
+ target_link_libraries (${file}
+ PRIVATE ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} "$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>"
+ )
+ endif ()
set_target_properties (${file} PROPERTIES FOLDER test/par)
ENDMACRO (ADD_H5P_EXE file)
diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake
index b4c8111..0702d13 100644
--- a/testpar/CMakeTests.cmake
+++ b/testpar/CMakeTests.cmake
@@ -18,8 +18,7 @@
# Remove any output file left over from previous test run
add_test (NAME MPI_TEST-clear-testphdf5-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
- ParaTest.h5
+ -E remove ParaTest.h5
WORKING_DIRECTORY
${HDF5_TEST_PAR_BINARY_DIR}
)
diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake
index c0b848b..7333c6d 100644
--- a/testpar/CMakeVFDTests.cmake
+++ b/testpar/CMakeVFDTests.cmake
@@ -44,8 +44,8 @@ endforeach ()
NAME MPI_TEST_VFD-${vfdname}-${h5_test}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
- ${vfdname}-shared/${vfdname}-${h5_test}.out
- ${vfdname}-shared/${vfdname}-${h5_test}.out.err
+ ${vfdname}/${vfdname}-${h5_test}.out
+ ${vfdname}/${vfdname}-${h5_test}.out.err
)
add_test (
NAME MPI_TEST_VFD-${vfdname}-${h5_test}