File: git-test-openmp2

package info (click to toggle)
eztrace 2.0%2Brepack-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,132 kB
  • sloc: ansic: 23,501; perl: 910; sh: 857; cpp: 771; makefile: 696; fortran: 327; f90: 320; python: 57
file content (46 lines) | stat: -rw-r--r-- 1,849 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
commit 9f35b10184dca3230dbe58bb4bbf8fc9920c3971
Author: François Trahay <francois.trahay@telecom-sudparis.eu>
Date:   Thu Aug 25 09:20:14 2022 +0200

    fix the compilation of the openmp test suite

---
 test/CMakeLists.txt        |    2 +-
 test/openmp/CMakeLists.txt |    8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

--- a/test/openmp/CMakeLists.txt
+++ b/test/openmp/CMakeLists.txt
@@ -4,14 +4,20 @@ enable_testing()
 
 if (EZTRACE_ENABLE_OPENMP)
 
+  # openmp tests need to be instrumented with eztrace_cc
   set(CMAKE_C_FLAGS "-fopenmp")
-  set(LINK_OPTIONS "-fopenmp")
+  set(CMAKE_C_COMPILER_LAUNCHER "${CMAKE_BINARY_DIR}/src/modules/omp/bin/eztrace_cc")
 
   add_executable(openmp_openmp_simple openmp_simple.c)
   add_executable(openmp_test_lock test_lock.c)
   add_executable(openmp_test_nest_lock test_nest_lock.c)
   add_executable(openmp_test_task test_task.c)
 
+  target_link_libraries(openmp_openmp_simple eztpomp)
+  target_link_libraries(openmp_test_lock eztpomp)
+  target_link_libraries(openmp_test_nest_lock eztpomp)
+  target_link_libraries(openmp_test_task eztpomp)
+
   set_target_properties(openmp_openmp_simple PROPERTIES OUTPUT_NAME "openmp_simple")
   set_target_properties(openmp_test_lock PROPERTIES OUTPUT_NAME "test_lock")
   set_target_properties(openmp_test_nest_lock PROPERTIES OUTPUT_NAME "test_nest_lock")
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -4,7 +4,7 @@ enable_testing()
 
 set(EZTRACE_LIBRARY_PATH "${CMAKE_BINARY_DIR}/src/eztrace-lib")
 set(TEST_ENVIRONMENT  "EZTRACE_AVAIL_PATH=${CMAKE_BINARY_DIR}/src/eztrace_avail"
-  "EZTRACE_CC_PATH=${CMAKE_BINARY_DIR}/modules/omp/bin/eztrace_cc"
+  "EZTRACE_CC_PATH=${CMAKE_BINARY_DIR}/src/modules/omp/bin/eztrace_cc"
   "EZTRACE_PATH=${CMAKE_BINARY_DIR}/src/eztrace"
   "OTF2_PRINT_PATH=${OTF2_PRINT}"
   "EZTRACE_TEST_OPTION=-p"