mirror of
https://github.com/nasa/trick.git
synced 2024-12-21 06:03:10 +00:00
2a03ff5cf4
* Replace sprintf with snprintf in all of Trick source. #1384 * Don't add -Werror for MacOS because of deprecated sprintf warnings which we cant get rid of because SWIG. #1384 * Fixed an unbalanced parenthesis in S_overrides.mk. #1384
24 lines
925 B
Makefile
24 lines
925 B
Makefile
MODELS :=$(CURDIR)/models
|
|
|
|
# Warn about comment markers /* within comments and make them errors, causing
|
|
# the build to fail.
|
|
TRICK_CXXFLAGS += -I$(MODELS) -Wcomment
|
|
|
|
# We can't yet make warnings to be errors on MacOS, because
|
|
# MACOS deprecates and warns about sprintf. But SWIG
|
|
# still generates code containing sprintf..
|
|
ifneq ($(TRICK_HOST_TYPE), Darwin)
|
|
TRICK_CXXFLAGS += -Werror
|
|
endif
|
|
|
|
PATHS := $(MODELS)/many $(MODELS)/nested
|
|
|
|
# The zero directory contains no files, so FIND_MODEL_OBJECTS should return an
|
|
# empty list, resulting in a rule that is never run. If it is, the invalid
|
|
# "not_a_flag" should cause the build to fail.
|
|
$(call FIND_MODEL_OBJECTS, $(MODELS)/zero): TRICK_CXXFLAGS += not_a_flag
|
|
|
|
# By turning off warnings about comment markers within comments in all the
|
|
# offending files, this sim should build without error.
|
|
$(call FIND_MODEL_OBJECTS, $(MODELS)/one/1 $(PATHS)): TRICK_CXXFLAGS += -Wno-comment
|