Skip to content

Commit

Permalink
Rename cbindgen test
Browse files Browse the repository at this point in the history
Change lib and package name, to make it more clear,
which is used.
  • Loading branch information
jschwe committed Jan 1, 2025
1 parent a639bc1 commit 40260c2
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions test/cbindgen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
corrosion_tests_add_test(cbindgen_rust2cpp "cpp-exe" TEST_SRC_DIR rust2cpp)
corrosion_tests_add_test(cbindgen_rust2cpp_auto "cpp-exe" TEST_SRC_DIR auto)
corrosion_tests_add_test(cbindgen_manual "cpp-exe" TEST_SRC_DIR manual)


set_tests_properties(cbindgen_rust2cpp_run_cpp-exe cbindgen_manual_run_cpp-exe
set_tests_properties(cbindgen_rust2cpp_auto_run_cpp-exe cbindgen_manual_run_cpp-exe
PROPERTIES PASS_REGULAR_EXPRESSION
"^add_point Result: Point { x: 100, y: 100 }\r?\n$"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ project(test_project VERSION 0.1.0)
set(CORROSION_TOOLS_RUST_TOOLCHAIN "stable")
include(../../test_header.cmake)
corrosion_import_crate(MANIFEST_PATH rust/Cargo.toml)
corrosion_experimental_cbindgen(TARGET rust_lib HEADER_NAME "rust-lib.h")
corrosion_experimental_cbindgen(TARGET the_rust_lib_crate_name HEADER_NAME "rust-lib.h")

add_executable(cpp-exe main.cpp)
set_property(TARGET cpp-exe PROPERTY CXX_STANDARD 11)
target_link_libraries(cpp-exe PUBLIC rust_lib)
target_link_libraries(cpp-exe PUBLIC the_rust_lib_crate_name)
File renamed without changes.

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

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "rust-lib"
name = "the_rust_package_name"
version = "0.1.0"
license = "MIT"
edition = "2018"
Expand All @@ -8,3 +8,4 @@ edition = "2018"

[lib]
crate-type=["staticlib"]
name = "the_rust_lib_crate_name"
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 40260c2

Please sign in to comment.