在 configure.ac 我定义了 AM_CXXFLAGS
AC_SUBS([AM_CXXFLAGS], "-Wall -Wextra -Werror -std=gnu++11"])
在 Makefile.am 我需要在我的程序中禁用警告
bin_Programs = foo bar
# Works
foo_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=unused
foo_SOURCES = foo.cc
# Does not work, results in CXXFLAGS being just the -Wno-error=unused
bar_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/include
bar_CXXFLAGS = $(AM_CXXFLAGS) -Wno-error=unused
bar_SOURCES = bar.cc
为什么它不适用于酒吧?如何解决?
旁注:vim 语法高亮标记第二个 AM_CXXFLAGS 为红色