Introduce DISABLE_WARNING_AS_ERROR in Makefile

Summary: See https://www.facebook.com/groups/rocksdb.dev/permalink/718536351578215/. We should enable people to run without warning-as-error, since we break this so often for different compilers.

Test Plan: introduce an warning, compile sucessfully

Reviewers: yhchiang, meyering, igor.sugak, rven, sdong

Reviewed By: sdong

Subscribers: adamretter, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D33963
main
Igor Canadi 10 years ago
parent bd339a9798
commit 217854dc4a
  1. 6
      Makefile

@ -124,9 +124,13 @@ install:
[ ! -e $(SHARED) ] || install -C -m 644 $(SHARED) $(INSTALL_PATH)/lib [ ! -e $(SHARED) ] || install -C -m 644 $(SHARED) $(INSTALL_PATH)/lib
#------------------------------------------------- #-------------------------------------------------
WARNING_FLAGS = -W -Wextra -Wall -Werror -Wsign-compare -Wshadow \ WARNING_FLAGS = -W -Wextra -Wall -Wsign-compare -Wshadow \
-Wno-unused-parameter -Wno-unused-parameter
ifndef DISABLE_WARNING_AS_ERROR
WARNING_FLAGS += -Werror
endif
CFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CCFLAGS) $(OPT) CFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CCFLAGS) $(OPT)
CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverloaded-virtual -Wnon-virtual-dtor CXXFLAGS += $(WARNING_FLAGS) -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -Woverloaded-virtual -Wnon-virtual-dtor

Loading…
Cancel
Save