Skip to content

Commit

Permalink
Merge pull request #91 from CleverRaven/master
Browse files Browse the repository at this point in the history
Merge pull request CleverRaven#38334 from davidpwbrown/dead_npc_owner…
  • Loading branch information
fengjixuchui authored Feb 26, 2020
2 parents 60ecce5 + 241522e commit e954c9c
Show file tree
Hide file tree
Showing 349 changed files with 3,507 additions and 3,551 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
packages: ["g++-5=5.3.1-14ubuntu2", "libstdc++-5-dev=5.3.1-14ubuntu2", "gcc-5=5.3.1-14ubuntu2", "gcc-5-base=5.3.1-14ubuntu2", "cpp-5=5.3.1-14ubuntu2", "libgcc-5-dev=5.3.1-14ubuntu2", "libasan2=5.3.1-14ubuntu2", "libmpx0=5.3.1-14ubuntu2"]
sources: [*apt_sources]

- env: COMPILER=g++-8 CXXFLAGS='-Wno-implicit-fallthrough' TILES=1 SOUND=1 SANITIZE=address
- env: COMPILER=g++-8 CXXFLAGS='-Wno-implicit-fallthrough' TILES=1 SOUND=1 SANITIZE=address EXTRA_TEST_OPTS="~[.] ~vehicle_efficiency"
name: "GCC 8 Make build with Tiles, Sound, astyle and address sanitization"
dist: bionic
compiler: gcc
Expand All @@ -84,7 +84,7 @@ jobs:
packages: ["g++-8", "g++-8-multilib", "libc6-dbg", "libc6-dbg:i386", "libsdl2-dev", "libsdl2-ttf-dev", "libsdl2-image-dev", "libsdl2-mixer-dev", "astyle"]
sources: *apt_sources

- env: CLANG=clang++-8 SANITIZE=address,undefined EXTRA_TEST_OPTS="~[.] ~vehicle_efficiency ~vehicle_drag ~starting_items ~starve_test"
- env: CLANG=clang++-8 SANITIZE=address,undefined EXTRA_TEST_OPTS="~[.] ~vehicle_efficiency ~vehicle_drag ~starting_items ~[starve] ~grenade_lethality"
name: "Clang 8 Make build with sanitizers enabled, but long-running tests disabled"
compiler: clang
addons: &clang8
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,18 @@ IF(MSVC)
ELSE()
SET(CATA_WARNINGS
"-Werror -Wall -Wextra \
-Wformat-signedness \
-Wlogical-op \
-Wmissing-declarations \
-Wmissing-noreturn \
-Wnon-virtual-dtor \
-Wold-style-cast \
-Woverloaded-virtual \
-Wsuggest-override \
-Wpedantic \
-Wredundant-decls \
-Wsuggest-override \
-Wunused-macros \
-Wzero-as-null-pointer-constant \
-Wno-unknown-warning-option")
# Compact the whitespace in the warning string
string(REGEX REPLACE "[\t ]+" " " CATA_WARNINGS "${CATA_WARNINGS}")
Expand Down
23 changes: 17 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,17 @@
RELEASE_FLAGS =
WARNINGS = \
-Werror -Wall -Wextra \
-Wformat-signedness \
-Wlogical-op \
-Wmissing-declarations \
-Wmissing-noreturn \
-Wnon-virtual-dtor \
-Wold-style-cast \
-Woverloaded-virtual \
-Wpedantic \
-Wsuggest-override \
-Wunused-macros \
-Wzero-as-null-pointer-constant \
-Wno-unknown-warning-option
# Uncomment below to disable warnings
#WARNINGS = -w
Expand Down Expand Up @@ -165,6 +170,13 @@ ifdef MSYSTEM
MSYS2 = 1
endif

# Determine JSON formatter binary name
ifeq ($(MSYS2), 1)
JSON_FORMATTER_BIN=tools/format/json_formatter.exe
else
JSON_FORMATTER_BIN=tools/format/json_formatter.cgi
endif

# Enable backtrace by default
ifndef BACKTRACE
# ...except not on native Windows builds, because the relevant headers are
Expand Down Expand Up @@ -362,7 +374,7 @@ endif
CXXFLAGS += $(WARNINGS) $(DEBUG) $(DEBUGSYMS) $(PROFILE) $(OTHERS) -MMD -MP
TOOL_CXXFLAGS = -DCATA_IN_TOOL

BINDIST_EXTRAS += README.md data doc LICENSE.txt LICENSE-OFL-Terminus-Font.txt VERSION.txt
BINDIST_EXTRAS += README.md data doc LICENSE.txt LICENSE-OFL-Terminus-Font.txt VERSION.txt $(JSON_FORMATTER_BIN)
BINDIST = $(BUILD_PREFIX)cataclysmdda-$(VERSION).tar.gz
W32BINDIST = $(BUILD_PREFIX)cataclysmdda-$(VERSION).zip
BINDIST_CMD = tar --transform=s@^$(BINDIST_DIR)@cataclysmdda-$(VERSION)@ -czvf $(BINDIST) $(BINDIST_DIR)
Expand Down Expand Up @@ -475,6 +487,10 @@ ifneq (,$(findstring mingw32,$(CROSS)))
TARGETSYSTEM=WINDOWS
endif

ifneq ($(TARGETSYSTEM),WINDOWS)
WARNINGS += -Wredundant-decls
endif

# Global settings for Windows targets
ifeq ($(TARGETSYSTEM),WINDOWS)
CHKJSON_BIN = chkjson.exe
Expand Down Expand Up @@ -1067,11 +1083,6 @@ endif

JSON_FILES = $(shell find data -name "*.json" | sed "s|^\./||")
JSON_WHITELIST = $(filter-out $(shell cat json_blacklist), $(JSON_FILES))
ifeq ($(MSYS2), 1)
JSON_FORMATTER_BIN=tools/format/json_formatter.exe
else
JSON_FORMATTER_BIN=tools/format/json_formatter.cgi
endif

style-json: $(JSON_WHITELIST)

Expand Down
Loading

0 comments on commit e954c9c

Please sign in to comment.