From cf26a36fec320fd7905dcd249ea3ca6eaa780ec5 Mon Sep 17 00:00:00 2001 From: Cedric Bail Date: Sun, 10 Mar 2013 11:42:19 +0100 Subject: [PATCH] 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 --- configure.ac | 4 +++- src/Makefile_Evil.am | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index fa78b98115..01ed6e2af8 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/Makefile_Evil.am b/src/Makefile_Evil.am index c60edcfa23..6aac926808 100644 --- a/src/Makefile_Evil.am +++ b/src/Makefile_Evil.am @@ -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@