evil: cleanup compiler flags.

- Pass EVIL_CFLAGS to C++ compiled files (needed for -DEF_EVIL_BUILD)
- Some warning flags should not be passed to C++ compiler, so put them in another variable
This commit is contained in:
Cedric Bail 2013-03-10 11:42:19 +01:00
parent 5fc7829c96
commit cf26a36fec
2 changed files with 5 additions and 3 deletions

View File

@ -519,7 +519,8 @@ AC_SUBST([EVIL_DLFCN_LIBS])
EVIL_DLFCN_CPPFLAGS="-DEFL_EVIL_DLFCN_BUILD -DPSAPI_VERSION=1"
# TODO: should we have these at EFL (global?)
EVIL_CFLAGS="-Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls ${EVIL_CFLAGS}"
# Note: these warnings should not be used with C++ code
EVIL_CFLAGS_WRN="-Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
EVIL_CXXFLAGS="${EVIL_CXXFLAGS}"
if test "x${have_win32}" = "xyes" ; then
@ -528,6 +529,7 @@ if test "x${have_win32}" = "xyes" ; then
fi
AC_SUBST([EVIL_DLFCN_CPPFLAGS])
AC_SUBST([EVIL_CFLAGS_WRN])
AC_SUBST([EVIL_CXXFLAGS])
### Checks for linker characteristics

View File

@ -95,8 +95,8 @@ else
lib_evil_libevil_la_SOURCES += lib/evil/evil_link_xp.cpp
endif
lib_evil_libevil_la_CFLAGS = @EVIL_CFLAGS@
lib_evil_libevil_la_CXXFLAGS = @EVIL_CXXFLAGS@
lib_evil_libevil_la_CFLAGS = @EVIL_CFLAGS@ @EVIL_CFLAGS_WRN@
lib_evil_libevil_la_CXXFLAGS = @EVIL_CXXFLAGS@ @EVIL_CFLAGS@
lib_evil_libevil_la_LIBADD = @EVIL_LIBS@
lib_evil_libevil_la_DEPENDENCIES = @EVIL_INTERNAL_LIBS@
lib_evil_libevil_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@