summaryrefslogtreecommitdiffstats
path: root/fortran/testpar/CMakeLists.txt
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2022-10-06 16:08:56 (GMT)
committerGitHub <noreply@github.com>2022-10-06 16:08:56 (GMT)
commite80079fd21ffe6978ac69e7632e069cc44874675 (patch)
treeb1f75384a0df8385cb8ad5e13b233554c20bdfa1 /fortran/testpar/CMakeLists.txt
parenta322eb6147f243e1d45934ddfc1cfa6f69a0ddec (diff)
downloadhdf5-e80079fd21ffe6978ac69e7632e069cc44874675.zip
hdf5-e80079fd21ffe6978ac69e7632e069cc44874675.tar.gz
hdf5-e80079fd21ffe6978ac69e7632e069cc44874675.tar.bz2
Subfiling Fortran wrapper work. (#2143)
* added C ref. for Fortran constants * added C ref. for Fortran constants * move constant paramters to H5* module listing * added back comment * Fortran subfiling and ioc FD with tests. H5Pset/get_mpi_params wrappers with tests, misc.. parallel test clean-up. * misc. fixes * fixed CMake testpar issues, formatted, misc. updates * updated tests
Diffstat (limited to 'fortran/testpar/CMakeLists.txt')
-rw-r--r--fortran/testpar/CMakeLists.txt44
1 files changed, 41 insertions, 3 deletions
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index c6712d3..e395937 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -4,7 +4,7 @@ project (HDF5_FORTRAN_TESTPAR C Fortran)
#-----------------------------------------------------------------------------
# Setup include Directories
#-----------------------------------------------------------------------------
-set (TESTPAR_INCLUDES ${MPI_Fortran_INCLUDE_DIRS} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src))
+set (TESTPAR_INCLUDES ${MPI_Fortran_INCLUDE_DIRS} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
if (NOT BUILD_SHARED_LIBS)
set (TESTPAR_INCLUDES ${TESTPAR_INCLUDES} ${CMAKE_Fortran_MODULE_DIRECTORY}/static)
else ()
@@ -53,12 +53,50 @@ else ()
)
endif ()
-#set_property(TARGET parallel_test APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">)
-#set_property(TARGET parallel_test APPEND PROPERTY LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>)
if(MSVC)
set_property(TARGET parallel_test PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
endif()
+#-- Adding test for subfiling_test
+add_executable (subfiling_test
+ subfiling.F90
+)
+target_include_directories (subfiling_test
+ PRIVATE ${TESTPAR_INCLUDES}
+)
+target_compile_options(subfiling_test
+ PRIVATE
+ "${HDF5_CMAKE_Fortran_FLAGS}"
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
+)
+if (NOT BUILD_SHARED_LIBS)
+ target_link_libraries (subfiling_test
+ PRIVATE
+ ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_Fortran_LIBS}
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"ws2_32.lib">
+ )
+ set_target_properties (subfiling_test PROPERTIES
+ FOLDER test/fortran
+ LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ )
+else ()
+ target_link_libraries (subfiling_test
+ PRIVATE
+ ${HDF5_F90_TEST_LIBSH_TARGET} ${HDF5_F90_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_Fortran_LIBS}
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"ws2_32.lib">
+ )
+ set_target_properties (subfiling_test PROPERTIES
+ FOLDER test/fortran
+ LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
+ )
+endif ()
+
+if(MSVC)
+ set_property(TARGET subfiling_test PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+endif()
+
if (HDF5_TEST_FORTRAN AND HDF5_TEST_PARALLEL)
include (CMakeTests.cmake)
endif ()