aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorIvan Efremov <i350300800e@gmail.com>2021-06-10 16:13:22 +0300
committerGitHub <noreply@github.com>2021-06-10 14:13:22 +0100
commit8b6db2e0b3b340dd747c735e48a4691619e063ce (patch)
tree52a62ffc740cc3997202e998b0f0cf22bdca588d /Makefile
parentc34d6ec02bae297b9256ac45ff71da0e2d4b4bc1 (diff)
downloadlibvfio-user-8b6db2e0b3b340dd747c735e48a4691619e063ce.zip
libvfio-user-8b6db2e0b3b340dd747c735e48a4691619e063ce.tar.gz
libvfio-user-8b6db2e0b3b340dd747c735e48a4691619e063ce.tar.bz2
Fix make CFLAGS="-DNDEBUG" failure (#563)
Do sanity check of -DNDEBUG before compiling to prevent disabling assertions Signed-off-by: Ivan Efremov <i350300800e@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
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)" \