Skip to content

Commit d5754a3

Browse files
committed
Link more libraries against rust API to make sure we avoid build sequencing issues at build time
1 parent 693e40b commit d5754a3

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,17 +268,15 @@ if(WITH_RUST_API)
268268

269269
FetchContent_MakeAvailable(Corrosion)
270270

271-
# find_package(Corrosion REQUIRED)
272271
corrosion_import_crate(MANIFEST_PATH src/libcprover-rust/Cargo.toml)
273272
corrosion_set_env_vars(cprover-api-rust CBMC_LIB_DIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
274273
corrosion_link_libraries(cprover-api-rust cprover-api-cpp)
275274
install(TARGETS cprover-api-rust RUNTIME DESTINATION lib)
276-
# NOTE: We create a symlink for a name consistent with the name of the
275+
# NOTE: We want to rename to a name consistent with the name of the
277276
# rest of the static libraries built as a result of a build. The reason
278277
# we cannot set the target name directly is that Cargo doesn't support
279278
# hyphens in names of packages, so it builds the name by default with
280279
# an underscore.
281-
# file(CREATE_LINK ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libcprover_api_rust.a ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libcprover-api-rust.a SYMBOLIC)
282280
endif()
283281

284282
include(cmake/packaging.cmake)

regression/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ add_subdirectory(goto-interpreter)
8686
add_subdirectory(cbmc-sequentialization)
8787
add_subdirectory(cpp-linter)
8888
add_subdirectory(catch-framework)
89-
# add_subdirectory(libcprover-cpp)
89+
add_subdirectory(libcprover-cpp)
9090

9191
if(WITH_MEMORY_ANALYZER)
9292
add_subdirectory(snapshot-harness)

src/libcprover-cpp/CMakeLists.txt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,21 @@ file(GLOB_RECURSE sources "*.cpp" "*.h")
33
# This step builds the API in the form of a statically linked library (libcprover-api-cpp.a)
44
add_library(cprover-api-cpp ${sources})
55
generic_includes(cprover-api-cpp)
6-
target_link_libraries(cprover-api-cpp goto-checker goto-programs util langapi ansi-c)
6+
target_link_libraries(cprover-api-cpp
7+
goto-checker
8+
goto-programs
9+
util
10+
langapi
11+
ansi-c
12+
json-symtab-language
13+
solvers
14+
xml
15+
cpp
16+
cbmc-lib
17+
analyses
18+
statement-list
19+
linking
20+
pointer-analysis
21+
goto-instrument-lib
22+
goto-analyzer-lib
23+
goto-cc-lib)

0 commit comments

Comments
 (0)