|
5 | 5 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
6 | 6 |
|
7 | 7 | # This example builds the HPX driver from the upstream task-bench repository |
8 | | -# (https://github.com/StanfordLegion/task-bench) as an external dependency. |
9 | | -# No task-bench source files are vendored here. |
| 8 | +# (https://github.com/StanfordLegion/task-bench) as an external dependency. No |
| 9 | +# task-bench source files are vendored here. |
10 | 10 |
|
11 | 11 | cmake_minimum_required(VERSION 3.17) |
12 | 12 |
|
13 | 13 | include(FetchContent) |
14 | 14 |
|
15 | | -# Fetch task-bench from upstream. Pin to the commit that includes the HPX |
16 | | -# driver so the build is reproducible. |
17 | | -FetchContent_Declare( |
| 15 | +# Fetch task-bench from upstream. Pin to the commit that includes the HPX driver |
| 16 | +# so the build is reproducible. |
| 17 | +fetchcontent_declare( |
18 | 18 | task_bench |
19 | 19 | GIT_REPOSITORY https://github.com/StanfordLegion/task-bench.git |
20 | | - GIT_TAG master |
21 | | - SOURCE_SUBDIR hpx |
| 20 | + GIT_TAG master |
| 21 | + SOURCE_SUBDIR hpx |
22 | 22 | ) |
23 | 23 |
|
24 | 24 | # Build the core library first (required by the HPX driver). |
25 | | -FetchContent_GetProperties(task_bench) |
| 25 | +fetchcontent_getproperties(task_bench) |
26 | 26 | if(NOT task_bench_POPULATED) |
27 | | - FetchContent_Populate(task_bench) |
| 27 | + fetchcontent_populate(task_bench) |
28 | 28 | endif() |
29 | 29 |
|
30 | 30 | set(TASK_BENCH_CORE_DIR "${task_bench_SOURCE_DIR}/core") |
31 | 31 |
|
| 32 | +# core_random.c and siphash.c are C files; enable C so cmake can compile them. |
| 33 | +enable_language(C) |
| 34 | + |
32 | 35 | # Build the core static library. |
33 | 36 | add_library( |
34 | 37 | task_bench_core STATIC |
@@ -68,10 +71,11 @@ if(MPI_FOUND) |
68 | 71 | FOLDER "Examples/TaskBench" |
69 | 72 | ) |
70 | 73 | else() |
71 | | - add_executable(hpx_distributed |
72 | | - "${task_bench_SOURCE_DIR}/hpx/hpx_distributed.cc") |
| 74 | + add_executable( |
| 75 | + hpx_distributed "${task_bench_SOURCE_DIR}/hpx/hpx_distributed.cc" |
| 76 | + ) |
73 | 77 | target_link_libraries(hpx_distributed PUBLIC HPX::hpx HPX::wrap_main) |
74 | 78 | endif() |
75 | 79 | target_include_directories(hpx_distributed PRIVATE "${TASK_BENCH_CORE_DIR}") |
76 | | - target_link_libraries(hpx_distributed PUBLIC task_bench_core MPI::MPI_CXX) |
| 80 | + target_link_libraries(hpx_distributed PUBLIC task_bench_core MPI::MPI_C) |
77 | 81 | endif() |
0 commit comments