From 3b1f4e00a610dcdba22ac8e86d019944229522a6 Mon Sep 17 00:00:00 2001 From: John Levon Date: Thu, 20 May 2021 11:04:43 +0100 Subject: use cmake3 if available (#503) Currently, on systems with both cmake and cmake3, we require cmake even if cmake3 is the only cmake version available (and SPDK encodes this silly requirement). Use and prefer "cmake3" if available. Signed-off-by: John Levon Reviewed-by: Swapnil Ingle --- Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6e801cf..aae9071 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ ifeq ($(VERBOSE),) MAKEFLAGS += -s endif -CMAKE = cmake +CMAKE = $(shell bash -c "command -v cmake3 cmake" | head -1) BUILD_DIR_BASE = $(CURDIR)/build BUILD_DIR = $(BUILD_DIR_BASE)/$(BUILD_TYPE) @@ -64,13 +64,11 @@ all $(filter-out $(PHONY_TARGETS), $(MAKECMDGOALS)): $(BUILD_DIR)/Makefile # NB: add --capture=no to get a C-level assert failure output. # PYTESTCMD = \ - $(shell which -a pytest-3 /bin/true 2>/dev/null | head -1) \ - -rP \ - --quiet + $(shell bash -c "command -v pytest-3 /bin/true" | head -1) \ + -rP --quiet PYTEST = \ - BUILD_TYPE=$(BUILD_TYPE) \ - $(PYTESTCMD) + BUILD_TYPE=$(BUILD_TYPE) $(PYTESTCMD) # # In our tests, we make sure to destroy the ctx at the end of each test; this is -- cgit v1.1