Skip to content

Commit

Permalink
Fix: Allow to link against GCOV (#614)
Browse files Browse the repository at this point in the history
* Rust: link in test builds against gcov
* Update the everest-framework

---------

Signed-off-by: Dima Dorezyuk <[email protected]>
Signed-off-by: Dima Dorezyuk <[email protected]>
Co-authored-by: Dima Dorezyuk <[email protected]>
  • Loading branch information
dorezyuk and Dima Dorezyuk authored Apr 5, 2024
1 parent 70d1136 commit 75cc247
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
8 changes: 7 additions & 1 deletion cmake/everest-generate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ if (EVEREST_ENABLE_RS_SUPPORT)
message(STATUS "Creating rust workspace at ${RUST_WORKSPACE_DIR}")
endif ()

if (EVEREST_CORE_BUILD_TESTING)
set(EVERESTRS_FEATURE_FLAGS ",features = [\"link_gcov\"]")
else()
set(EVERESTRS_FEATURE_FLAGS "")
endif()

# NOTE (aw): we could also write a small python script, which would do that for us
add_custom_command(OUTPUT ${RUST_WORKSPACE_CARGO_FILE}
COMMAND
Expand All @@ -149,7 +155,7 @@ if (EVEREST_ENABLE_RS_SUPPORT)
COMMAND
echo "[workspace.dependencies]" >> Cargo.toml
COMMAND
echo "everestrs = { path = \"$<TARGET_PROPERTY:everest::everestrs_sys,EVERESTRS_DIR>\" }" >> Cargo.toml
echo "everestrs = { path = \"$<TARGET_PROPERTY:everest::everestrs_sys,EVERESTRS_DIR>\" ${EVERESTRS_FEATURE_FLAGS} }" >> Cargo.toml
COMMAND
echo "everestrs-build = { path = \"$<TARGET_PROPERTY:everest::everestrs_sys,EVERESTRS_BUILD_DIR>\" }" >> Cargo.toml
COMMAND
Expand Down
4 changes: 2 additions & 2 deletions modules/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions modules/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ members = [
]

[workspace.dependencies]
everestrs = { git = "https://github.com/everest/everest-framework.git", rev = "01468678f5b627a96791f749f3139c3d169bf081" }
everestrs-build = { git = "https://github.com/everest/everest-framework.git", rev = "01468678f5b627a96791f749f3139c3d169bf081" }
everestrs = { git = "https://github.com/everest/everest-framework.git", rev = "b9f9b5ddff46856027346a98f5c16d11b16f7436" }
everestrs-build = { git = "https://github.com/everest/everest-framework.git", rev = "b9f9b5ddff46856027346a98f5c16d11b16f7436" }
4 changes: 2 additions & 2 deletions third-party/bazel/repos.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ def everest_core_repos():
maybe(
http_archive,
name = "everest-framework",
url = "https://github.com/everest/everest-framework/archive/86a2051ff9a087b82e70b3c93c09006fe8f99aab.tar.gz",
strip_prefix = "everest-framework-86a2051ff9a087b82e70b3c93c09006fe8f99aab",
url = "https://github.com/everest/everest-framework/archive/b9f9b5ddff46856027346a98f5c16d11b16f7436.tar.gz",
strip_prefix = "everest-framework-b9f9b5ddff46856027346a98f5c16d11b16f7436",
)

0 comments on commit 75cc247

Please sign in to comment.