From 10c63d743cd62c58acf9fa490f809c115c0936b6 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sat, 23 Mar 2024 00:43:02 +0100 Subject: [PATCH] build: Add support for using the system concurrentqueue headers Add a new USE_SYSTEM_CONCURRENTQUEUE make variable to select whether to include the system concurrentqueue headers. --- src/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index fc58b64f5..9452f5959 100644 --- a/src/Makefile +++ b/src/Makefile @@ -268,7 +268,13 @@ endif # Include paths to dependencies FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -FINAL_CXXFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/rocksdb/include/ -I../deps/concurrentqueue +FINAL_CXXFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -I../deps/rocksdb/include/ + +ifeq ($(USE_SYSTEM_CONCURRENTQUEUE),yes) + FINAL_CXXFLAGS+= -I/usr/include/concurrentqueue/moodycamel +else + FINAL_CXXFLAGS+= -I../deps/concurrentqueue +endif # Determine systemd support and/or build preference (defaulting to auto-detection) BUILD_WITH_SYSTEMD=no @@ -414,6 +420,7 @@ persist-settings: distclean echo STD=$(STD) >> .make-settings echo WARN=$(WARN) >> .make-settings echo OPT=$(OPT) >> .make-settings + echo USE_SYSTEM_CONCURRENTQUEUE=$(USE_SYSTEM_CONCURRENTQUEUE) >> .make-settings echo MALLOC=$(MALLOC) >> .make-settings echo BUILD_TLS=$(BUILD_TLS) >> .make-settings echo USE_SYSTEMD=$(USE_SYSTEMD) >> .make-settings