aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2024-03-23 02:21:38 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2024-03-23 02:21:38 +0100
commit5764088e7abb48f78df2e6d7365710073f774e1a (patch)
tree837314e31807d94c801294befa48527ad2408170
parent1f40daf5c9684be57fc8aea719407b6efc9e010c (diff)
downloadcpp-utils-5764088e7abb48f78df2e6d7365710073f774e1a.tar.gz
cpp-utils-5764088e7abb48f78df2e6d7365710073f774e1a.zip
make: allow passing c++std via STD variable
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index cdf10eb..db0e8ab 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,8 @@ RUNS = $(TEST:%=run/%)
DEPS_GEN = -MMD
SANITIZER = -fsanitize=address -fsanitize=undefined -fsanitize=leak -fno-omit-frame-pointer
-CXXFLAGS = -Og -g -Wall -Wextra -Werror -I. -std=c++14 $(DEPS_GEN) $(SANITIZER)
+STD ?= 14
+CXXFLAGS = -Og -g -Wall -Wextra -Werror -I. -std=c++$(STD) $(DEPS_GEN) $(SANITIZER)
LDFLAGS = $(SANITIZER)
# -- RULES ---------------------------------------------------------------------