Skip to content

Commit 302334a

Browse files
fix cmake-format and enable C language for task_bench_core
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
1 parent eea07f6 commit 302334a

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

examples/task_bench/CMakeLists.txt

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,33 @@
55
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
66

77
# 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.
1010

1111
cmake_minimum_required(VERSION 3.17)
1212

1313
include(FetchContent)
1414

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(
1818
task_bench
1919
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
2222
)
2323

2424
# Build the core library first (required by the HPX driver).
25-
FetchContent_GetProperties(task_bench)
25+
fetchcontent_getproperties(task_bench)
2626
if(NOT task_bench_POPULATED)
27-
FetchContent_Populate(task_bench)
27+
fetchcontent_populate(task_bench)
2828
endif()
2929

3030
set(TASK_BENCH_CORE_DIR "${task_bench_SOURCE_DIR}/core")
3131

32+
# core_random.c and siphash.c are C files; enable C so cmake can compile them.
33+
enable_language(C)
34+
3235
# Build the core static library.
3336
add_library(
3437
task_bench_core STATIC
@@ -68,10 +71,11 @@ if(MPI_FOUND)
6871
FOLDER "Examples/TaskBench"
6972
)
7073
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+
)
7377
target_link_libraries(hpx_distributed PUBLIC HPX::hpx HPX::wrap_main)
7478
endif()
7579
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)
7781
endif()

0 commit comments

Comments
 (0)