diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-01-31 16:53:42 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-01-31 16:53:42 (GMT) |
commit | 561a0c8ff556f7b3cee58eb867ae1aa74edc61a2 (patch) | |
tree | 09962b6cda505cca3c6bbd440fc728a9affd4c96 /fortran | |
parent | cd8ca92f58dfb14b60757404eb0b67dfb383e7e3 (diff) | |
parent | a29f9e8451ffa391c8395db1142bd003f40f3aaa (diff) | |
download | hdf5-561a0c8ff556f7b3cee58eb867ae1aa74edc61a2.zip hdf5-561a0c8ff556f7b3cee58eb867ae1aa74edc61a2.tar.gz hdf5-561a0c8ff556f7b3cee58eb867ae1aa74edc61a2.tar.bz2 |
Merge pull request #2331 in HDFFV/hdf5 from ~BYRN/hdf5_adb:hdf5_1_12 to hdf5_1_12
* commit 'a29f9e8451ffa391c8395db1142bd003f40f3aaa':
Merge changes from develop to fix various issues
Remove commented flags
Revert accidental change
Chnage tools debug macros to not use the error stack
Create common warnings for build systems
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/testpar/CMakeLists.txt | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index 17aa6c3..1f8dbb4 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -4,7 +4,12 @@ project (HDF5_FORTRAN_TESTPAR C Fortran) #----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- -set (TESTPAR_INCLUDES ${MPI_Fortran_INCLUDE_DIRS} ${CMAKE_Fortran_MODULE_DIRECTORY}/static ${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 () + set (TESTPAR_INCLUDES ${TESTPAR_INCLUDES} ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) +endif () #----------------------------------------------------------------------------- # Add Tests @@ -24,11 +29,30 @@ target_compile_options(parallel_test PRIVATE $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}> ) -target_link_libraries (parallel_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"> -) +if (NOT BUILD_SHARED_LIBS) + target_link_libraries (parallel_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 (parallel_test PROPERTIES + FOLDER test/fortran + LINKER_LANGUAGE Fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static + ) +else () + target_link_libraries (parallel_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 (parallel_test PROPERTIES + FOLDER test/fortran + LINKER_LANGUAGE Fortran + Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared + ) +endif () + #set_property(TARGET parallel_test APPEND PROPERTY # LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE"> #) @@ -38,12 +62,6 @@ target_link_libraries (parallel_test if(MSVC) set_property(TARGET parallel_test PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}") endif() -set_target_properties (parallel_test PROPERTIES - FOLDER test/fortran - LINKER_LANGUAGE Fortran - Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static -) -endif () if (HDF5_TEST_FORTRAN AND HDF5_TEST_PARALLEL) include (CMakeTests.cmake) |