From b43125d6373db49e5191b2c7ae5e5bb7017df999 Mon Sep 17 00:00:00 2001 From: Stephanie Brink Date: Fri, 10 May 2024 11:40:34 -0700 Subject: [PATCH] add caliper to multithreaded and mpi tests --- src/c/test/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/c/test/CMakeLists.txt b/src/c/test/CMakeLists.txt index 21e5ae8c..c324212e 100644 --- a/src/c/test/CMakeLists.txt +++ b/src/c/test/CMakeLists.txt @@ -24,7 +24,11 @@ if(PERFFLOWASPECT_WITH_MULTITHREADS) add_executable(smoketest_MT smoketest_MT.cpp) set_source_files_properties(smoketest_MT.cpp COMPILE_FLAGS "-Xclang -load -Xclang ../weaver/weave/libWeavePass.so -fPIC") set(THREADS_PREFER_PTHREAD_FLAG ON) - target_link_libraries(smoketest_MT ${perfflow_deps} pthread) + if(PERFFLOWASPECT_WITH_CALIPER) + target_link_libraries(smoketest_MT ${perfflow_deps} pthread caliper) + else() + target_link_libraries(smoketest_MT ${perfflow_deps} pthread) + endif() endif() if(PERFFLOWASPECT_WITH_MPI) @@ -32,7 +36,11 @@ if(PERFFLOWASPECT_WITH_MPI) add_executable(smoketest_MPI smoketest_MPI.cpp) set_source_files_properties(smoketest_MPI.cpp COMPILE_FLAGS "-Xclang -load -Xclang ../weaver/weave/libWeavePass.so -fPIC") include_directories(${MPI_INCLUDE_PATH}) - target_link_libraries(smoketest_MPI ${perfflow_deps} ${MPI_LIBRARIES}) + if(PERFFLOWASPECT_WITH_CALIPER) + target_link_libraries(smoketest_MPI ${perfflow_deps} ${MPI_LIBRARIES} caliper) + else() + target_link_libraries(smoketest_MPI ${perfflow_deps} ${MPI_LIBRARIES}) + endif() endif() if(PERFFLOWASPECT_WITH_CUDA)