From e7a86c42a463595d6ef37598fd556a01ca0903fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 30 Jun 2020 22:25:49 +0100 Subject: [PATCH] ut/blob: more portable cunit version check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit headers can be installed in different directories but `/usr/include` Signed-off-by: Jörg Thalheim Change-Id: Ibc4641813f6f1c904560dfe7d05cb9b40109cea7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3134 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- test/unit/lib/blob/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/lib/blob/Makefile b/test/unit/lib/blob/Makefile index 019f966d0..a039a423e 100644 --- a/test/unit/lib/blob/Makefile +++ b/test/unit/lib/blob/Makefile @@ -34,7 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -CUNIT_VERSION = $(shell sed -n -e 's/.*VERSION "\([0-9\.\-]*\).*/\1/p' /usr/include/CUnit/CUnit.h) +CUNIT_VERSION = $(shell echo "\#include " | $(CC) -E -dM - | sed -n -e 's/.*VERSION "\([0-9\.\-]*\).*/\1/p') ifeq ($(CUNIT_VERSION),2.1-3) DIRS-y = blob.c else