summaryrefslogtreecommitdiffstats
path: root/fortran/testpar
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-04-30 14:03:29 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-04-30 14:03:29 (GMT)
commit76d0cc0ca992e3f373c64ddc578ebfed09c77455 (patch)
treefc76278eee4526f38688aff3d0b5afd1431ff74c /fortran/testpar
parent80afe46e70a824086f4744081eaf92836639109d (diff)
downloadhdf5-76d0cc0ca992e3f373c64ddc578ebfed09c77455.zip
hdf5-76d0cc0ca992e3f373c64ddc578ebfed09c77455.tar.gz
hdf5-76d0cc0ca992e3f373c64ddc578ebfed09c77455.tar.bz2
TRILABS-19 Refactor fortran properties
Diffstat (limited to 'fortran/testpar')
-rw-r--r--fortran/testpar/CMakeLists.txt28
1 files changed, 18 insertions, 10 deletions
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index a6984b7..f08d6a6 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -16,18 +16,26 @@ add_executable (parallel_test
hyper.f90
mdset.f90
)
-TARGET_FORTRAN_PROPERTIES (parallel_test STATIC)
+target_include_directories (parallel_test
+ PRIVATE
+ ${TESTPAR_INCLUDES}
+)
+target_compile_options(parallel_test
+ PRIVATE
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
+)
target_link_libraries (parallel_test
- ${HDF5_F90_TEST_LIB_TARGET}
- ${HDF5_F90_LIB_TARGET}
- ${HDF5_LIB_TARGET}
- ${LINK_Fortran_LIBS}
+ 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
+ LINK_FLAGS
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"/SUBSYSTEM:CONSOLE">
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
)
-if (WIN32 AND MSVC)
- target_link_libraries (parallel_test "ws2_32.lib")
endif ()
-target_include_directories (parallel_test PRIVATE ${TESTPAR_INCLUDES})
-set_target_properties (parallel_test PROPERTIES LINKER_LANGUAGE Fortran)
-set_target_properties (parallel_test PROPERTIES FOLDER test/fortran)
include (CMakeTests.cmake)