From 8b6db2e0b3b340dd747c735e48a4691619e063ce Mon Sep 17 00:00:00 2001 From: Ivan Efremov Date: Thu, 10 Jun 2021 16:13:22 +0300 Subject: Fix make CFLAGS="-DNDEBUG" failure (#563) Do sanity check of -DNDEBUG before compiling to prevent disabling assertions Signed-off-by: Ivan Efremov --- Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0bbc813..a33dbb8 100644 --- a/Makefile +++ b/Makefile @@ -147,6 +147,9 @@ realclean: rm -rf $(GCOVS) $(BUILD_DIR)/Makefile: +ifneq (,$(filter -DNDEBUG,$(CFLAGS))) + $(error -DNDEBUG flag is not supported) +endif mkdir -p $(BUILD_DIR) cd $(BUILD_DIR); $(CMAKE) \ -D "CMAKE_C_COMPILER:STRING=$(CC)" \ -- cgit v1.1