diff --git a/common.mk b/common.mk index a126a30..fd7ebf1 100644 --- a/common.mk +++ b/common.mk @@ -26,7 +26,7 @@ endif # -------------------------- # Compiler / Linker flags # -------------------------- -CXXFLAGS := -std=c++23 -Wall -Wextra $(OPTFLAGS) $(SAN_FLAGS) +CXXFLAGS := -std=c++23 -Wall -Wextra -Werror $(OPTFLAGS) $(SAN_FLAGS) LDFLAGS := $(SAN_FLAGS) # -------------------------- diff --git a/fold-left-fold-right/Makefile b/fold-left-fold-right/Makefile index 941ebb4..7b9a123 100644 --- a/fold-left-fold-right/Makefile +++ b/fold-left-fold-right/Makefile @@ -2,7 +2,7 @@ include ../common.mk # per-example flags -CXXFLAGS += -pthread +# CXXFLAGS += -pthread TARGET := $(notdir $(CURDIR)) SRCS := main.cpp diff --git a/parallel-transform/Makefile b/parallel-transform/Makefile index 8921317..8024040 100644 --- a/parallel-transform/Makefile +++ b/parallel-transform/Makefile @@ -2,7 +2,7 @@ include ../common.mk # per-example flags -CXXFLAGS += -pthread +# CXXFLAGS += -pthread ## get it from the folder name TARGET := $(notdir $(CURDIR)) diff --git a/smart-ptr/Makefile b/smart-ptr/Makefile index e7cce5b..60d49d6 100644 --- a/smart-ptr/Makefile +++ b/smart-ptr/Makefile @@ -1,5 +1,8 @@ -CXX = g++ -CXXFLAGS = -std=c++23 -Wall -Wextra -g -I. +# pull in shared compiler settings +include ../common.mk + +# per-example flags +# CXXFLAGS += -pthread TARGET := $(notdir $(CURDIR)) SRCS = main.cpp diff --git a/unique-ptr-basics/Makefile b/unique-ptr-basics/Makefile index adb9514..2c48d2b 100644 --- a/unique-ptr-basics/Makefile +++ b/unique-ptr-basics/Makefile @@ -1,6 +1,9 @@ # shared compiler configuration include ../common.mk +# per-example flags +# CXXFLAGS += -pthread + TARGET := $(notdir $(CURDIR)) SRCS := main.cpp OBJS := $(SRCS:.cpp=.o) diff --git a/views-zip-enumerate/Makefile b/views-zip-enumerate/Makefile index 941ebb4..7b9a123 100644 --- a/views-zip-enumerate/Makefile +++ b/views-zip-enumerate/Makefile @@ -2,7 +2,7 @@ include ../common.mk # per-example flags -CXXFLAGS += -pthread +# CXXFLAGS += -pthread TARGET := $(notdir $(CURDIR)) SRCS := main.cpp