diff options
Diffstat (limited to 'fortran/testpar/CMakeLists.txt')
-rw-r--r-- | fortran/testpar/CMakeLists.txt | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index fe5827d..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) |