Commit 85c17ea9 authored by Francis Dupont's avatar Francis Dupont

[4283] Moved clang and missing initializer -Wno-* to improved/fixed configure

parent 1137ccfe
......@@ -106,6 +106,7 @@ AC_LANG([C++])
AM_CONDITIONAL(USE_GXX, test "X${GXX}" = "Xyes")
AC_CHECK_DECL([__SUNPRO_CC], [SUNCXX="yes"], [SUNCXX="no"])
AC_CHECK_DECL([__clang__], [CLANGPP="yes"], [CLANGPP="no"])
# USE_CLANGPP is no longer used, keep it by summetry with USE_GXX?
AM_CONDITIONAL(USE_CLANGPP, test "X${CLANGPP}" = "Xyes")
dnl Determine if we are using GNU sed
......@@ -136,9 +137,9 @@ AC_DEFUN([KEA_CXX_TRY_FLAG], [
AC_MSG_CHECKING([whether $CXX supports $1])
kea_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $1"
CXXFLAGS="$CXXFLAGS -Werror $1"
AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void){ return 0;}])],
AC_LINK_IFELSE([AC_LANG_SOURCE([int main(){ return 0;}])],
[kea_cxx_flag=yes], [kea_cxx_flag=no])
CXXFLAGS="$kea_save_CXXFLAGS"
......@@ -169,16 +170,12 @@ fi
# happen if clang++ is used via ccache. So, although probably suboptimal,
# we suppress this particular warning. Note that it doesn't weaken checks
# on the source code.
if test "$CLANGPP" = "yes"; then
if test "X$CLANGPP" = "Xyes"; then
CXX_VERSION=`$CXX --version 2> /dev/null | head -1`
KEA_CXXFLAGS="$KEA_CXXFLAGS -Qunused-arguments"
fi
KEA_CXX_TRY_FLAG([-Wno-missing-field-initializers],
[WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG="-Wno-missing-field-initializers"])
AC_SUBST(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
# gcc specific settings:
# gcc/clang specific settings:
if test "X$GXX" = "Xyes"; then
CXX_VERSION=`$CXX --version 2> /dev/null | head -1`
KEA_CXXFLAGS="$KEA_CXXFLAGS -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare"
......@@ -206,13 +203,15 @@ esac
KEA_CXXFLAGS="$KEA_CXXFLAGS $MULTITHREADING_FLAG"
# Don't use -Werror if configured not to
werror_extras=
AC_ARG_WITH(werror,
AC_HELP_STRING([--with-werror], [Compile using -Werror (default=yes)]),
[
case "${withval}" in
yes) with_werror=1 ;;
no) with_werror=0 ;;
*) AC_MSG_ERROR(bad value ${withval} for --with-werror) ;;
-*) with_werror=1; werror_extras=${withval} ;;
*) AC_MSG_ERROR(bad value ${withval} for --with-werror) ;;
esac],
[with_werror=1])
......@@ -236,6 +235,30 @@ if test $with_werror = 1; then
CXXFLAGS="$CXXFLAGS_SAVED"
fi
# Added flags after -Werror
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
KEA_CXX_TRY_FLAG([-Wno-missing-field-initializers],
[KEA_CXXFLAGS="$KEA_CXXFLAGS -Wno-missing-field-initializers"])
if test "X$CLANGPP" = "Xyes"; then
# This is to workaround unused variables tcout and tcerr in
# log4cplus's streams.h and unused parameters from some of the
# Boost headers.
KEA_CXXFLAGS="$KEA_CXXFLAGS -Wno-unused-variable -Wno-unused-parameter"
fi
# Add the extras at the very last
# Note it can be used to re-enable a (fatal) warning
for extra in $werror_extras; do
KEA_CXX_TRY_FLAG([$extra],
[KEA_CXXFLAGS="$KEA_CXXFLAGS $extra"],
[AC_MSG_ERROR([$CXX does not support $extra"])])
done
fi dnl GXX = yes
# allow building programs with static link. we need to make it selective
......@@ -1114,7 +1137,7 @@ LIBS=$LIBS_SAVED
AX_BOOST_FOR_KEA
# Boost offset_ptr is required in one library and not optional right now, so
# we unconditionally fail here if it doesn't work.
if test "$BOOST_OFFSET_PTR_WOULDFAIL" = "yes" -a "$werror_ok" = 1; then
if test "$BOOST_OFFSET_PTR_WOULDFAIL" = "yes" -a X"$werror_ok" = X1; then
AC_MSG_ERROR([Failed to compile a required header file. Try upgrading Boost to 1.44 or higher (when using clang++) or specifying --without-werror. See the ChangeLog entry for Trac no. 2147 for more details.])
fi
......
......@@ -14,10 +14,6 @@ AM_CPPFLAGS += $(CQL_CPPFLAGS)
endif
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
endif
if USE_STATIC_LINK
AM_LDFLAGS = -static
......
......@@ -29,10 +29,6 @@ CLEANFILES = $(builddir)/interfaces.txt $(builddir)/logger_lockfile
DISTCLEANFILES = d2_process_tests.sh
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
endif
if USE_STATIC_LINK
AM_LDFLAGS = -static
......
......@@ -15,10 +15,6 @@ AM_CPPFLAGS += $(CQL_CPPFLAGS)
endif
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
endif
if USE_STATIC_LINK
AM_LDFLAGS = -static
......
......@@ -32,10 +32,6 @@ CLEANFILES += *.json *.log
DISTCLEANFILES = dhcp4_process_tests.sh
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
endif
if USE_STATIC_LINK
AM_LDFLAGS = -static
......
......@@ -15,10 +15,6 @@ AM_CPPFLAGS += $(CQL_CPPFLAGS)
endif
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
endif
if USE_STATIC_LINK
AM_LDFLAGS = -static
......
......@@ -33,10 +33,6 @@ CLEANFILES += *.json *.log
DISTCLEANFILES = dhcp6_process_tests.sh
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
endif
if USE_STATIC_LINK
AM_LDFLAGS = -static
......
......@@ -3,12 +3,7 @@ SUBDIRS = . tests
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
endif
if USE_STATIC_LINK
AM_LDFLAGS = -static
......
......@@ -24,10 +24,6 @@ CLEANFILES = $(builddir)/interfaces.txt $(builddir)/logger_lockfile
DISTCLEANFILES =
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some Boost headers when compiling with clang
AM_CXXFLAGS += -Wno-unused-parameter
endif
if USE_STATIC_LINK
AM_LDFLAGS = -static
......
......@@ -6,23 +6,11 @@ AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
if USE_CLANGPP
# Workaround unused parameters in boost version included in FreeBSD 10
AM_CXXFLAGS += -Wno-unused-parameter
endif
AM_LDFLAGS = -lm
if USE_STATIC_LINK
AM_LDFLAGS += -static
endif
# convenience archive
noinst_LTLIBRARIES = libperfdhcp.la
......@@ -38,16 +26,8 @@ libperfdhcp_la_SOURCES += rate_control.cc rate_control.h
libperfdhcp_la_SOURCES += stats_mgr.h
libperfdhcp_la_SOURCES += test_control.cc test_control.h
libperfdhcp_la_CXXFLAGS = $(AM_CXXFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some of the
# Boost headers when compiling with clang.
libperfdhcp_la_CXXFLAGS += -Wno-unused-parameter
endif
sbin_PROGRAMS = perfdhcp
perfdhcp_SOURCES = main.cc
libkea_perfdhcp___la_CXXFLAGS = $(AM_CXXFLAGS)
perfdhcp_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS)
......
......@@ -35,12 +35,6 @@ run_unittests_SOURCES += command_options_helper.h
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some of the
# Boost headers when compiling with clang.
run_unittests_CXXFLAGS = -Wno-unused-parameter
endif
run_unittests_LDADD = $(top_builddir)/src/bin/perfdhcp/libperfdhcp.la
run_unittests_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
run_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
......
......@@ -4,12 +4,6 @@ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
# Define rule to build logging source files from message file
user_chk_messages.h user_chk_messages.cc: s-messages
s-messages: user_chk_messages.mes
......@@ -48,11 +42,6 @@ nodist_libduc_la_SOURCES = user_chk_messages.cc user_chk_messages.h
libduc_la_CXXFLAGS = $(AM_CXXFLAGS)
libduc_la_CPPFLAGS = $(AM_CPPFLAGS)
if USE_CLANGPP
# Disable unused parameter warning caused by some of the
# Boost headers when compiling with clang.
libduc_la_CXXFLAGS += -Wno-unused-parameter
endif
noinst_LTLIBRARIES += libdhcp_user_chk.la
......
......@@ -8,12 +8,6 @@ AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
USER_CHK_LIB = $(top_builddir)/src/hooks/dhcp/user_chk/libdhcp_user_chk.la
if USE_STATIC_LINK
......@@ -44,12 +38,6 @@ libdhcp_user_chk_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) $(LOG4CPL
libdhcp_user_chk_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
libdhcp_user_chk_unittests_CXXFLAGS = $(AM_CXXFLAGS)
if USE_CLANGPP
# This is to workaround unused variables tcout and tcerr in
# log4cplus's streams.h and unused parameters from some of the
# Boost headers.
libdhcp_user_chk_unittests_CXXFLAGS += -Wno-unused-parameter
endif
libdhcp_user_chk_unittests_LDADD = $(top_builddir)/src/hooks/dhcp/user_chk/libduc.la
libdhcp_user_chk_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
......
......@@ -26,12 +26,8 @@ EXTRA_DIST = asiodns_messages.mes
# Note: the ordering matters: -Wno-... must follow -Wextra (defined in
# KEA_CXXFLAGS)
libkea_asiodns_la_CPPFLAGS = $(AM_CPPFLAGS)
libkea_asiodns_la_CXXFLAGS = $(AM_CXXFLAGS)
if USE_CLANGPP
# Avoid ASIO header unused-paramet problem with clang
libkea_asiodns_la_CXXFLAGS += -Wno-unused-parameter
endif
libkea_asiodns_la_CPPFLAGS = $(AM_CPPFLAGS)
libkea_asiodns_la_LIBADD = $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
libkea_asiodns_la_LIBADD += $(top_builddir)/src/lib/log/libkea-log.la
libkea_asiodns_la_LIBADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
......
......@@ -9,18 +9,9 @@ CLEANFILES = *.gcno *.gcda
# This is a wrapper library.
libkea_asiolink_la_CPPFLAGS = $(AM_CPPFLAGS)
# Note: the ordering matters: -Wno-... must follow -Wextra (defined in
# KEA_CXXFLAGS)
libkea_asiolink_la_CXXFLAGS = $(AM_CXXFLAGS)
# The ASIO header files have some code fragments that would hit
# gcc's unused-parameter warning, which would make the build fail
# with -Werror (our default setting).
if USE_CLANGPP
# Avoid this problem with clang
libkea_asiolink_la_CXXFLAGS += -Wno-unused-parameter
endif
lib_LTLIBRARIES = libkea-asiolink.la
......@@ -41,6 +32,10 @@ libkea_asiolink_la_SOURCES += tcp_socket.h
libkea_asiolink_la_SOURCES += udp_endpoint.h
libkea_asiolink_la_SOURCES += udp_socket.h
# Note: the ordering matters: -Wno-... must follow -Wextra (defined in
# KEA_CXXFLAGS)
libkea_asiolink_la_CXXFLAGS = $(AM_CXXFLAGS)
libkea_asiolink_la_CPPFLAGS = $(AM_CPPFLAGS)
libkea_asiolink_la_LIBADD = $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
libkea_asiolink_la_LIBADD += $(BOOST_LIBS)
......
......@@ -8,12 +8,6 @@ if USE_STATIC_LINK
AM_LDFLAGS = -static
endif
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
CLEANFILES = *.gcno *.gcda
TESTS_ENVIRONMENT = \
......
......@@ -4,11 +4,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Workaround unused parameters in boost version included in FreeBSD 10
AM_CXXFLAGS += -Wno-unused-parameter
endif
lib_LTLIBRARIES = libkea-cc.la
libkea_cc_la_SOURCES = data.cc data.h
libkea_cc_la_SOURCES += command_interpreter.cc command_interpreter.h
......
......@@ -4,12 +4,6 @@ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
CLEANFILES = *.gcno *.gcda
lib_LTLIBRARIES = libkea-dhcp++.la
......@@ -113,9 +107,3 @@ libkea_dhcp___include_HEADERS = \
pkt_filter_lpf.h \
protocol_util.h \
std_option_defs.h
if USE_CLANGPP
# Disable unused parameter warning caused by some of the
# Boost headers when compiling with clang.
libkea_dhcp___la_CXXFLAGS += -Wno-unused-parameter
endif
......@@ -7,12 +7,6 @@ AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
if USE_STATIC_LINK
AM_LDFLAGS = -static
endif
......@@ -102,12 +96,6 @@ libdhcp___unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
libdhcp___unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
libdhcp___unittests_CXXFLAGS = $(AM_CXXFLAGS)
if USE_CLANGPP
# This is to workaround unused variables tcout and tcerr in
# log4cplus's streams.h and unused parameters from some of the
# Boost headers.
libdhcp___unittests_CXXFLAGS += -Wno-unused-variable -Wno-unused-parameter
endif
libdhcp___unittests_LDADD = $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
libdhcp___unittests_LDADD += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
......
......@@ -4,13 +4,6 @@ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
# Define rule to build logging source files from message file
dhcp_ddns_messages.h dhcp_ddns_messages.cc: s-messages
......@@ -54,12 +47,4 @@ libkea_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/log/libkea-log.la
libkea_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/util/threads/libkea-threads.la
libkea_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/util/libkea-util.la
libkea_dhcp_ddns_la_LIBADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
libkea_dhcp_ddns_la_LIBADD += $(LOG4CPLUS_LIBS) $(CRYPTO_LIBS)
if USE_CLANGPP
# Disable unused parameter warning caused by some of the
# Boost headers when compiling with clang.
libkea_dhcp_ddns_la_CXXFLAGS += -Wno-unused-parameter
endif
......@@ -7,12 +7,6 @@ AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
if USE_STATIC_LINK
AM_LDFLAGS = -static
endif
......@@ -33,15 +27,9 @@ libdhcp_ddns_unittests_SOURCES += test_utils.cc test_utils.h
libdhcp_ddns_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
libdhcp_ddns_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
libdhcp_ddns_unittests_CXXFLAGS = $(AM_CXXFLAGS)
if USE_CLANGPP
# This is to workaround unused variables tcout and tcerr in
# log4cplus's streams.h and unused parameters from some of the
# Boost headers.
libdhcp_ddns_unittests_CXXFLAGS += -Wno-unused-parameter
endif
libdhcp_ddns_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
libdhcp_ddns_unittests_LDADD = $(top_builddir)/src/lib/dhcp_ddns/libkea-dhcp_ddns.la
libdhcp_ddns_unittests_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
......
......@@ -67,12 +67,6 @@ BUILT_SOURCES = alloc_engine_messages.h alloc_engine_messages.cc
BUILT_SOURCES += dhcpsrv_messages.h dhcpsrv_messages.cc
BUILT_SOURCES += hosts_messages.h hosts_messages.cc
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
# Make sure the generated files are deleted in a "clean" operation
CLEANFILES = *.gcno *.gcda
CLEANFILES += alloc_engine_messages.h alloc_engine_messages.cc
......@@ -208,12 +202,6 @@ if HAVE_CQL
libkea_dhcpsrv_la_LDFLAGS += $(CQL_LIBS)
endif
if USE_CLANGPP
# Disable unused parameter warning caused by some of the
# Boost headers when compiling with clang.
libkea_dhcpsrv_la_CXXFLAGS += -Wno-unused-parameter
endif
# The message file should be in the distribution
EXTRA_DIST += alloc_engine_messages.mes
EXTRA_DIST += dhcpsrv_messages.mes
......
......@@ -14,12 +14,6 @@ if USE_STATIC_LINK
AM_LDFLAGS = -static
endif
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
CLEANFILES = *.gcno *.gcda
TESTS_ENVIRONMENT = \
......@@ -144,6 +138,8 @@ if HAVE_CQL
libdhcpsrv_unittests_CPPFLAGS += $(CQL_CPPFLAGS)
endif
libdhcpsrv_unittests_CXXFLAGS = $(AM_CXXFLAGS)
libdhcpsrv_unittests_LDFLAGS = $(AM_LDFLAGS) $(CRYPTO_LDFLAGS) $(GTEST_LDFLAGS)
if HAVE_MYSQL
libdhcpsrv_unittests_LDFLAGS += $(MYSQL_LIBS)
......@@ -155,14 +151,6 @@ if HAVE_CQL
libdhcpsrv_unittests_LDFLAGS += $(CQL_LIBS)
endif
libdhcpsrv_unittests_CXXFLAGS = $(AM_CXXFLAGS)
if USE_CLANGPP
# This is to workaround unused variables tcout and tcerr in
# log4cplus's streams.h and unused parameters from some of the
# Boost headers.
libdhcpsrv_unittests_CXXFLAGS += -Wno-unused-variable -Wno-unused-parameter
endif
libdhcpsrv_unittests_LDADD = $(top_builddir)/src/lib/dhcpsrv/testutils/libdhcpsrvtest.la
libdhcpsrv_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
libdhcpsrv_unittests_LDADD += $(top_builddir)/src/lib/eval/libkea-eval.la
......
......@@ -6,11 +6,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
if USE_CLANGPP
# Workaround unused parameters in boost version included in FreeBSD 10
AM_CXXFLAGS += -Wno-unused-parameter
endif
CLEANFILES = *.gcno *.gcda
CLEANFILES += s-rdatacode
# These two are created with rrtype/class.h, so not explicitly listed in
......
......@@ -4,12 +4,6 @@ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
# GCC 4.4 emits warning about breaking strict aliasing rule.
# This warning is a result of a GCC bug:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41874
......@@ -17,11 +11,6 @@ AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
# Disabling the strict aliasing rule suppresses this warning.
AM_CXXFLAGS += $(WARNING_GCC_44_STRICT_ALIASING_CFLAG)
if USE_CLANGPP
# Workaround unused parameters in boost version included in FreeBSD 10
AM_CXXFLAGS += -Wno-unused-parameter
endif
lib_LTLIBRARIES = libkea-eval.la
libkea_eval_la_SOURCES =
libkea_eval_la_SOURCES += eval_log.cc eval_log.h
......
......@@ -6,12 +6,6 @@ AM_CPPFLAGS += -DLOGGING_SPEC_FILE=\"$(abs_top_srcdir)/src/lib/dhcpsrv/logging.s
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
if USE_STATIC_LINK
AM_LDFLAGS = -static
endif
......@@ -46,14 +40,6 @@ libeval_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exception
libeval_unittests_LDADD += $(top_builddir)/src/lib/testutils/libkea-testutils.la
libeval_unittests_LDADD += $(CRYPTO_LIBS) $(LOG4CPLUS_LIBS)
libeval_unittests_LDADD += $(BOOST_LIBS) $(GTEST_LDADD)
if USE_CLANGPP
# This is to workaround unused variables tcout and tcerr in
# log4cplus's streams.h and unused parameters from some of the
# Boost headers.
libeval_unittests_CXXFLAGS += -Wno-unused-variable -Wno-unused-parameter
endif
endif
noinst_PROGRAMS = $(TESTS)
......@@ -4,13 +4,6 @@ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
# Define rule to build logging source files from message file
hooks_messages.h hooks_messages.cc: s-messages
......@@ -74,9 +67,3 @@ libkea_hooks_include_HEADERS = \
library_handle.h \
hooks.h \
server_hooks.h
if USE_CLANGPP
# Disable unused parameter warning caused by some of the
# Boost headers when compiling with clang.
libkea_hooks_la_CXXFLAGS += -Wno-unused-parameter
endif
......@@ -4,11 +4,6 @@ AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# Some versions of GCC warn about some versions of Boost regarding
# missing initializer for members in its posix_time.
# https://svn.boost.org/trac/boost/ticket/3477
# But older GCC compilers don't have the flag.
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
# Kea libraries against which the test user libraries are linked.
HOOKS_LIB = $(top_builddir)/src/lib/hooks/libkea-hooks.la
......@@ -19,11 +14,6 @@ EXCEPTIONS_LIB = $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
ALL_LIBS = $(HOOKS_LIB) $(LOG_LIB) $(THREADS_LIB) $(UTIL_LIB) $(EXCEPTIONS_LIB) $(LOG4CPLUS_LIBS)
if USE_CLANGPP
# see ../Makefile.am
AM_CXXFLAGS += -Wno-unused-parameter
endif
# Files to clean include the file created by testing.
CLEANFILES = *.gcno *.gcda $(builddir)/marker_file.dat
......
......@@ -5,12 +5,6 @@ AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)
# This check is for clang complaining about unused parameter
# in boost version included in FreeBSD 10.
if USE_CLANGPP
AM_CXXFLAGS +=-Wno-unused-parameter
endif
if USE_STATIC_LINK
AM_LDFLAGS = -static
endif
......
......@@ -10,11 +10,6 @@ if USE_STATIC_LINK
AM_LDFLAGS += -static
endif