The main use of that make variable is to pass in -Werror. It makes
sense to apply this to C++ as well.
Reviewed-by: Tom Lane
Reviewed-by: Andres Freund
Discussion: https://www.postgresql.org/message-id/flat/
fe3e200c-edee-44e0-a6e3-
d45dca72873b%40eisentraut.org
it will break many of configure's built-in tests. To add
such flags, include them in the COPT environment variable
while running make. The contents of COPT
- are added to both the CFLAGS and LDFLAGS
+ are added to the CFLAGS, CXXFLAGS, and LDFLAGS
options set up by configure. For example, you could do
make COPT='-Werror'
#
ifdef COPT
CFLAGS += $(COPT)
+ CXXFLAGS += $(COPT)
LDFLAGS += $(COPT)
endif