@@ -42,7 +42,7 @@ format:
4242 cargo ${TOOLCHAIN_ARGS} fmt --all
4343
4444CLIPPY_WHITELIST += -A clippy::bool_assert_comparison
45- CMAKE_COMPAT_ARGS := -DCMAKE_POLICY_VERSION_MINIMUM=3.5
45+ CMAKE_COMPAT := CMAKE=" $( CURDIR ) /scripts/cmake-wrapper.sh"
4646# # Run clippy.
4747clippy :
4848 # Fresh lockfile resolution can pull grpcio/grpcio-sys versions that fail on
@@ -54,19 +54,19 @@ clippy:
5454 cargo ${TOOLCHAIN_ARGS} update -p grpcio-sys@0.10.3+1.44.0-patched --precise 0.10.1+1.44.0; \
5555 fi
5656ifdef WITH_NIGHTLY_FEATURES
57- CMAKE_ARGS="${CMAKE_COMPAT_ARGS} $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} clippy --all --features nightly_group,failpoints --all-targets -- -D clippy::all ${CLIPPY_WHITELIST}
57+ ${CMAKE_COMPAT} cargo ${TOOLCHAIN_ARGS} clippy --all --features nightly_group,failpoints --all-targets -- -D clippy::all ${CLIPPY_WHITELIST}
5858else
59- CMAKE_ARGS="${CMAKE_COMPAT_ARGS} $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} clippy --all --features failpoints --all-targets -- -D clippy::all ${CLIPPY_WHITELIST}
59+ ${CMAKE_COMPAT} cargo ${TOOLCHAIN_ARGS} clippy --all --features failpoints --all-targets -- -D clippy::all ${CLIPPY_WHITELIST}
6060endif
6161
6262# # Run tests.
6363test :
6464ifdef WITH_NIGHTLY_FEATURES
65- CMAKE_ARGS="${CMAKE_COMPAT_ARGS} $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} test --all --features nightly_group ${EXTRA_CARGO_ARGS} -- --nocapture
66- CMAKE_ARGS="${CMAKE_COMPAT_ARGS} $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} test --test failpoints --features nightly_group,failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
65+ ${CMAKE_COMPAT} cargo ${TOOLCHAIN_ARGS} test --all --features nightly_group ${EXTRA_CARGO_ARGS} -- --nocapture
66+ ${CMAKE_COMPAT} cargo ${TOOLCHAIN_ARGS} test --test failpoints --features nightly_group,failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
6767else
68- CMAKE_ARGS="${CMAKE_COMPAT_ARGS} $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} test --all ${EXTRA_CARGO_ARGS} -- --nocapture
69- CMAKE_ARGS="${CMAKE_COMPAT_ARGS} $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} test --test failpoints --features failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
68+ ${CMAKE_COMPAT} cargo ${TOOLCHAIN_ARGS} test --all ${EXTRA_CARGO_ARGS} -- --nocapture
69+ ${CMAKE_COMPAT} cargo ${TOOLCHAIN_ARGS} test --test failpoints --features failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
7070endif
7171
7272# # Run tests with various features for maximum code coverage.
@@ -75,10 +75,10 @@ test_matrix:
7575 $(error Must run test matrix with nightly features. Please reset WITH_STABLE_TOOLCHAIN.)
7676else
7777test_matrix : test
78- CMAKE_ARGS= " ${CMAKE_COMPAT_ARGS} $$ {CMAKE_ARGS} " cargo ${TOOLCHAIN_ARGS} test --all ${EXTRA_CARGO_ARGS} -- --nocapture
79- CMAKE_ARGS= " ${CMAKE_COMPAT_ARGS} $$ {CMAKE_ARGS} " cargo ${TOOLCHAIN_ARGS} test --test failpoints --features failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
80- CMAKE_ARGS= " ${CMAKE_COMPAT_ARGS} $$ {CMAKE_ARGS} " cargo ${TOOLCHAIN_ARGS} test --all --features nightly_group,std_fs ${EXTRA_CARGO_ARGS} -- --nocapture
81- CMAKE_ARGS= " ${CMAKE_COMPAT_ARGS} $$ {CMAKE_ARGS} " cargo ${TOOLCHAIN_ARGS} test --test failpoints --features nightly_group,std_fs,failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
78+ ${CMAKE_COMPAT} cargo ${TOOLCHAIN_ARGS} test --all ${EXTRA_CARGO_ARGS} -- --nocapture
79+ ${CMAKE_COMPAT} cargo ${TOOLCHAIN_ARGS} test --test failpoints --features failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
80+ ${CMAKE_COMPAT} cargo ${TOOLCHAIN_ARGS} test --all --features nightly_group,std_fs ${EXTRA_CARGO_ARGS} -- --nocapture
81+ ${CMAKE_COMPAT} cargo ${TOOLCHAIN_ARGS} test --test failpoints --features nightly_group,std_fs,failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
8282endif
8383
8484# # Build raft-engine-ctl.
0 commit comments