From 15462e7a27e01b3c46f0959ac9b290477c9cc0e9 Mon Sep 17 00:00:00 2001 From: Martin Uecker Date: Fri, 28 Jun 2024 08:49:40 +0200 Subject: [PATCH] -Wextra only without USE_CPP --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dbc46fb1b87..8067be95af5 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,12 @@ NVCC=nvcc OPTS=-Ofast LDFLAGS= -lm -pthread COMMON= -Iinclude/ -I3rdparty/stb/include -CFLAGS=-Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -fPIC -rdynamic +CFLAGS=-Wall -Wno-unused-parameter -Wno-unknown-pragmas -fPIC -rdynamic + +ifneq ($(USE_CPP), 1) +# C is not C++ +CFLAGS+=-Wextra +endif ifeq ($(DEBUG), 1) #OPTS= -O0 -g