Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lmdb cmake race condition #11959

Merged
merged 2 commits into from
Feb 12, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions barretenberg/cpp/cmake/module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ function(barretenberg_module MODULE_NAME)
# enable msgpack downloading via dependency (solves race condition)
add_dependencies(${MODULE_NAME} msgpack-c)
add_dependencies(${MODULE_NAME}_objects msgpack-c)

# enable lmdb downloading via dependency (solves race condition)
add_dependencies(${MODULE_NAME} lmdb)
add_dependencies(${MODULE_NAME}_objects lmdb)
list(APPEND lib_targets ${MODULE_NAME})

set(MODULE_LINK_NAME ${MODULE_NAME})
Expand Down Expand Up @@ -156,6 +160,10 @@ function(barretenberg_module MODULE_NAME)
# enable msgpack downloading via dependency (solves race condition)
add_dependencies(${MODULE_NAME}_test_objects msgpack-c)
add_dependencies(${MODULE_NAME}_tests msgpack-c)

# enable lmdb downloading via dependency (solves race condition)
add_dependencies(${MODULE_NAME}_test_objects lmdb)
add_dependencies(${MODULE_NAME}_tests lmdb)
if(NOT WASM)
# If collecting coverage data, set profile
# For some reason processor affinity doesn't work, so the developer has to set it manually anyway
Expand Down Expand Up @@ -277,6 +285,10 @@ function(barretenberg_module MODULE_NAME)
# enable msgpack downloading via dependency (solves race condition)
add_dependencies(${BENCHMARK_NAME}_bench_objects msgpack-c)
add_dependencies(${BENCHMARK_NAME}_bench msgpack-c)

# enable lmdb downloading via dependency (solves race condition)
add_dependencies(${BENCHMARK_NAME}_bench_objects lmdb)
add_dependencies(${BENCHMARK_NAME}_bench lmdb)
add_custom_target(
run_${BENCHMARK_NAME}_bench
COMMAND ${BENCHMARK_NAME}_bench
Expand Down
Loading