| 1 |
https://gitlab.com/eztrace/eztrace/-/merge_requests/40 |
| 2 |
|
| 3 |
commit 07cad731f15e624a08984cc89b44b68b57dc06f5 |
| 4 |
Author: Samuel Thibault <[email protected]> |
| 5 |
Date: Sat Aug 16 01:04:26 2025 +0200 |
| 6 |
|
| 7 |
Fix building starpu module and test |
| 8 |
|
| 9 |
CFLAGS are needed notably when hip is enabled, which requires |
| 10 |
__HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__ being defined. |
| 11 |
|
| 12 |
diff --git a/src/modules/starpu/CMakeLists.txt b/src/modules/starpu/CMakeLists.txt |
| 13 |
index 794d3931..9434d8cf 100644 |
| 14 |
--- a/src/modules/starpu/CMakeLists.txt |
| 15 |
+++ b/src/modules/starpu/CMakeLists.txt |
| 16 |
@@ -19,6 +19,11 @@ target_include_directories(eztrace-starpu |
| 17 |
${STARPU_INCLUDE_DIRS} |
| 18 |
) |
| 19 |
|
| 20 |
+target_compile_options(eztrace-starpu |
| 21 |
+ PRIVATE |
| 22 |
+ ${STARPU_CFLAGS} |
| 23 |
+) |
| 24 |
+ |
| 25 |
target_link_libraries(eztrace-starpu |
| 26 |
dl |
| 27 |
eztrace-core |
| 28 |
diff --git a/test/starpu/CMakeLists.txt b/test/starpu/CMakeLists.txt |
| 29 |
index b489f82a..61d0abb4 100644 |
| 30 |
--- a/test/starpu/CMakeLists.txt |
| 31 |
+++ b/test/starpu/CMakeLists.txt |
| 32 |
@@ -6,10 +6,12 @@ if (EZTRACE_ENABLE_STARPU) |
| 33 |
|
| 34 |
add_executable(starpu_hello starpu_hello.c) |
| 35 |
target_link_libraries(starpu_hello ${STARPU_LIBRARIES}) |
| 36 |
+ target_compile_options(starpu_hello PRIVATE ${STARPU_CFLAGS}) |
| 37 |
add_test(build_starpu_hello "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target starpu_hello) |
| 38 |
|
| 39 |
add_executable(starpu_mult starpu_mult.c) |
| 40 |
target_link_libraries(starpu_mult ${STARPU_LIBRARIES}) |
| 41 |
+ target_compile_options(starpu_mult PRIVATE ${STARPU_CFLAGS}) |
| 42 |
add_test(build_starpu_mult "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target starpu_mult) |
| 43 |
|
| 44 |
add_test (NAME starpu_tests COMMAND bash "${CMAKE_CURRENT_SOURCE_DIR}/run.sh" "${CMAKE_CURRENT_BINARY_DIR}") |