From a014bfb0c2e80b2c50c0535b60d9d78c1aae6f90 Mon Sep 17 00:00:00 2001 From: Ben Hourahine Date: Sat, 7 Nov 2020 10:44:35 +0000 Subject: [PATCH] Fixed helper related dependencies in test --- test/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 568429b..dff899d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -14,9 +14,15 @@ set(targets ) list(APPEND targets ${tested}) +set(sources-helper + testhelper.f90 + ) +add_library(mpifxtesthelp ${sources-helper}) +target_link_libraries(mpifxtesthelp PRIVATE MPI::MPI_Fortran MpiFx) + foreach(target IN LISTS targets) - add_executable(${target} ${target}.f90 testhelper.f90) - target_link_libraries(${target} MpiFx) + add_executable(${target} ${target}.f90) + target_link_libraries(${target} MpiFx mpifxtesthelp) endforeach() foreach(target IN LISTS tested)