Skip to content

Commit

Permalink
Fix default flags
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Jun 24, 2018
1 parent 7dc225c commit 2d482b5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,23 @@ else
UNAME_S := $(shell uname -s)
endif

# For Darwin (Mac OS X / macOS) we assume that the default compiler
# clang++ is used; when $(CXX) is some version of g++, then
# $(CXXSTD) has to be set to -std=c++11 (or newer) so
# that -stdlib=libc++ is not automatically added.

ifeq ($(CXXSTD),)
CXXSTD := -std=c++11
ifeq ($(UNAME_S),Darwin)
CXXSTD += -stdlib=libc++
endif
endif

# Ensure strict standard compliance and no warnings, can be
# changed if desired.

CPPFLAGS ?= -pedantic
CXXSTD ?= c++11
CXXFLAGS ?= -O3 -Wall -Wextra -Werror
CXXFLAGS ?= -Wall -Wextra -Wshadow -Werror -O3

CLANG_TIDY ?= clang-tidy

Expand Down

0 comments on commit 2d482b5

Please sign in to comment.