Skip to content

Commit

Permalink
Force cargo rebuilds (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Sep 26, 2023
1 parent f4b331b commit 54e85c8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
5 changes: 2 additions & 3 deletions example/c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ ALL_RUST := $(wildcard ../src/*.rs)

CC=gcc

$(ALL_RUST):
FORCE:

$(ALL_HEADERS):


../../target/debug/libdiplomat_example.a: $(ALL_RUST)
../../target/debug/libdiplomat_example.a: FORCE
cargo build

a.out: ../../target/debug/libdiplomat_example.a $(ALL_HEADERS) main.c
Expand Down
5 changes: 2 additions & 3 deletions example/c2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ ALL_RUST := $(wildcard ../src/*.rs)

CC=gcc

$(ALL_RUST):
FORCE:

$(ALL_HEADERS):


../../target/debug/libdiplomat_example.a: $(ALL_RUST)
../../target/debug/libdiplomat_example.a: FORCE
cargo build

a.out: ../../target/debug/libdiplomat_example.a $(ALL_HEADERS) main.c
Expand Down
6 changes: 2 additions & 4 deletions example/cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ ALL_RUST := $(wildcard ../src/*.rs)

CXX=g++-10

$(ALL_RUST):
FORCE:

$(ALL_HEADERS):


../../target/debug/libdiplomat_example.a: $(ALL_RUST)
../../target/debug/libdiplomat_example.a: FORCE
cargo build

./tests/fixeddecimal.out: ../../target/debug/libdiplomat_example.a $(ALL_HEADERS) ./tests/fixeddecimal.cpp
Expand All @@ -20,7 +19,6 @@ $(ALL_HEADERS):
./tests/fixeddecimal-20.out: ../../target/debug/libdiplomat_example.a $(ALL_HEADERS) ./tests/fixeddecimal.cpp
$(CXX) -std=c++20 ./tests/fixeddecimal.cpp ../../target/debug/libdiplomat_example.a -ldl -lpthread -lm -g -o ./tests/fixeddecimal-20.out


test: ./tests/fixeddecimal.out ./tests/fixeddecimal-20.out
./tests/fixeddecimal.out
./tests/fixeddecimal-20.out
4 changes: 2 additions & 2 deletions feature_tests/cpp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ ALL_RUST := $(wildcard ../src/*.rs)

CXX=g++-10

$(ALL_RUST):
FORCE:

$(ALL_HEADERS):

../../target/debug/libdiplomat_feature_tests.a: $(ALL_RUST)
../../target/debug/libdiplomat_feature_tests.a: FORCE
cargo build

./tests/structs.out: ../../target/debug/libdiplomat_feature_tests.a $(ALL_HEADERS) ./tests/structs.cpp
Expand Down

0 comments on commit 54e85c8

Please sign in to comment.