From 780b0bca978a74f832d0e9cdf6552cef750087a0 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Tue, 9 Dec 2014 15:59:36 +0100 Subject: [PATCH] added a handler for failed BOOST_ASSERT-ions; add global try-catch in main to catch exceptions --- src/CMakeLists.txt | 1 + src/boost_assert_handler.cpp | 26 ++++++++++++++++++++ src/boost_assert_handler.h | 15 +++++++++++ src/config/configuration.cpp | 3 +- src/config/configurationcommandline.cpp | 3 +- src/config/configurationfile.cpp | 3 +- src/config/configurationoptions.cpp | 2 +- src/config/configurationreader.cpp | 3 +- src/config/host.cpp | 4 +- src/config/option/hostconfigurationoption.cpp | 2 +- src/config/option/hostnameoption.cpp | 3 +- src/config/option/hostpingintervaloption.cpp | 3 +- src/config/option/hostpingprotocoloption.cpp | 3 +- src/config/option/hostportoption.cpp | 3 +- .../option/hostsourcenetworkinterfaceoption.cpp | 3 +- src/dns/dnsresolver.cpp | 2 +- src/dns/dnsresolverfactory.cpp | 2 + src/dns/hostaddress.cpp | 3 +- src/dns/timetolive.cpp | 2 +- src/host/hoststatus.cpp | 2 +- src/host/loglevel.cpp | 2 +- src/host/logoutput.cpp | 2 +- src/host/messagepayload.cpp | 5 ++- src/host/networkinterface.hpp | 2 +- src/host/networkinterfacelist.cpp | 4 +- src/host/pingerfactory.cpp | 1 + src/host/pinginterval.cpp | 2 +- src/host/pingprotocol.cpp | 2 +- src/host/pingrotate.cpp | 2 +- src/host/pingscheduler.cpp | 1 + src/icmp/icmppacketfactory.cpp | 2 +- src/icmp/icmppinger.cpp | 2 +- src/icmp/icmpv4header.cpp | 1 + src/icmp/icmpv4packet.cpp | 4 +- src/icmp/icmpv6header.cpp | 1 + src/icmp/icmpv6packet.cpp | 4 +- src/ip/ipv6header.cpp | 3 +- src/link/linkstatus.cpp | 4 +- src/link/statusnotifiercommand.cpp | 3 +- src/main.cpp | 2 + src/tcp/tcpheader.cpp | 3 +- src/tcp/tcpipv4segment.cpp | 4 +- src/tcp/tcpipv6segment.cpp | 4 +- src/tcp/tcppinger.cpp | 2 +- src/tcp/tcpsegmentfactory.cpp | 3 +- test/CMakeLists.test_configurationcommandline.txt | 1 + test/CMakeLists.test_configurationfile.txt | 1 + test/CMakeLists.test_configurationoptions.txt | 1 + test/CMakeLists.test_hoststatus.txt | 1 + test/CMakeLists.test_icmpv4header.txt | 1 + test/CMakeLists.test_icmpv6header.txt | 1 + test/CMakeLists.test_ipv4header.txt | 1 + test/CMakeLists.test_ipv6header.txt | 1 + test/CMakeLists.test_linkstatus.txt | 1 + test/CMakeLists.test_loglevel.txt | 1 + test/CMakeLists.test_logoutput.txt | 1 + test/CMakeLists.test_messagepayload.txt | 1 + test/CMakeLists.test_pingprotocol.txt | 1 + test/CMakeLists.test_tcpheader.txt | 1 + 59 files changed, 118 insertions(+), 49 deletions(-) create mode 100644 src/boost_assert_handler.cpp create mode 100644 src/boost_assert_handler.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ef00cfc..d9f1253 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -98,6 +98,7 @@ set(SOURCES tcp/tcpipv6segment.cpp tcp/tcpsegment.cpp tcp/tcpsegmentfactory.cpp + boost_assert_handler.cpp main.cpp ) diff --git a/src/boost_assert_handler.cpp b/src/boost_assert_handler.cpp new file mode 100644 index 0000000..ce787e5 --- /dev/null +++ b/src/boost_assert_handler.cpp @@ -0,0 +1,26 @@ +// Boost assertion handler +// +// Defines boost::assertion_failed which is declared in but +// not defined to be overwritten by user +// +// created 2014 by Christian Herdtweck, Intra2net AG +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include +#include +#include "boost_assert_handler.h" + +namespace boost +{ + void assertion_failed(char const * expr, char const * function, + char const * file, long line) + { + std::stringstream msg; + msg << "BOOST_ASSERT( " << expr << " ) failed for function " + << function << " (line " << line << ")!"; + throw std::runtime_error( msg.str() ); + } +} diff --git a/src/boost_assert_handler.h b/src/boost_assert_handler.h new file mode 100644 index 0000000..980a5b3 --- /dev/null +++ b/src/boost_assert_handler.h @@ -0,0 +1,15 @@ +// Boost assertion handler +// +// created 2014 by Christian Herdtweck, Intra2net AG +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_ASSERT_HANDLER_H +#define BOOST_ASSERT_HANDLER_H + +#define BOOST_ENABLE_ASSERT_HANDLER +#include + +#endif diff --git a/src/config/configuration.cpp b/src/config/configuration.cpp index 21fa226..2bc85b0 100644 --- a/src/config/configuration.cpp +++ b/src/config/configuration.cpp @@ -21,13 +21,14 @@ on this file might be covered by the GNU General Public License. #include #include // for seeding random number generator -#include #include #include #include #include #include +#include "boost_assert_handler.h" + using namespace std; using I2n::Logger::LogLevel; using I2n::Logger::GlobalLogger; diff --git a/src/config/configurationcommandline.cpp b/src/config/configurationcommandline.cpp index c7add1d..2acd73a 100644 --- a/src/config/configurationcommandline.cpp +++ b/src/config/configurationcommandline.cpp @@ -20,10 +20,9 @@ #include "config/configurationcommandline.h" -#include - #include +#include "boost_assert_handler.h" #include "config/configurationoptions.h" #include "config/option/hostnameoption.h" diff --git a/src/config/configurationfile.cpp b/src/config/configurationfile.cpp index b51c0b2..91e2303 100644 --- a/src/config/configurationfile.cpp +++ b/src/config/configurationfile.cpp @@ -23,10 +23,9 @@ #include #include -#include - #include +#include "boost_assert_handler.h" #include "config/configurationoptions.h" using namespace std; diff --git a/src/config/configurationoptions.cpp b/src/config/configurationoptions.cpp index 2fd3741..45981f1 100644 --- a/src/config/configurationoptions.cpp +++ b/src/config/configurationoptions.cpp @@ -22,11 +22,11 @@ #include -#include #include #include +#include "boost_assert_handler.h" #include "config/option/configfileoption.h" #include "config/option/daemonoption.h" #include "config/option/hostsdownlimitoption.h" diff --git a/src/config/configurationreader.cpp b/src/config/configurationreader.cpp index ef8a62d..43ddef9 100644 --- a/src/config/configurationreader.cpp +++ b/src/config/configurationreader.cpp @@ -19,8 +19,7 @@ on this file might be covered by the GNU General Public License. */ #include "config/configurationreader.h" -#include - +#include "boost_assert_handler.h" #include "config/configurationcommandline.h" #include "config/configurationfile.h" diff --git a/src/config/host.cpp b/src/config/host.cpp index a71e0cf..4768752 100644 --- a/src/config/host.cpp +++ b/src/config/host.cpp @@ -19,9 +19,9 @@ on this file might be covered by the GNU General Public License. */ #include "config/host.h" -#include +#include "boost_assert_handler.h" -#include +#include using namespace std; diff --git a/src/config/option/hostconfigurationoption.cpp b/src/config/option/hostconfigurationoption.cpp index 9116eac..c1116f2 100644 --- a/src/config/option/hostconfigurationoption.cpp +++ b/src/config/option/hostconfigurationoption.cpp @@ -23,11 +23,11 @@ #include #include -#include #include #include +#include "boost_assert_handler.h" #include "config/option/hostpingintervaloption.h" #include "config/option/hostpingprotocoloption.h" #include "config/option/hostportoption.h" diff --git a/src/config/option/hostnameoption.cpp b/src/config/option/hostnameoption.cpp index d62d968..6590f0a 100644 --- a/src/config/option/hostnameoption.cpp +++ b/src/config/option/hostnameoption.cpp @@ -23,11 +23,12 @@ #include #include -#include #include #include +#include "boost_assert_handler.h" + using namespace std; using boost::program_options::value; using boost::program_options::variables_map; diff --git a/src/config/option/hostpingintervaloption.cpp b/src/config/option/hostpingintervaloption.cpp index b7aac17..c271a09 100644 --- a/src/config/option/hostpingintervaloption.cpp +++ b/src/config/option/hostpingintervaloption.cpp @@ -22,7 +22,6 @@ #include -#include #include #include @@ -30,6 +29,8 @@ #include +#include "boost_assert_handler.h" + using namespace std; using boost::program_options::value; using boost::program_options::variables_map; diff --git a/src/config/option/hostpingprotocoloption.cpp b/src/config/option/hostpingprotocoloption.cpp index bd3011a..d5e5baf 100644 --- a/src/config/option/hostpingprotocoloption.cpp +++ b/src/config/option/hostpingprotocoloption.cpp @@ -24,11 +24,12 @@ #include #include -#include #include #include +#include "boost_assert_handler.h" + using namespace std; using boost::program_options::value; using boost::program_options::variables_map; diff --git a/src/config/option/hostportoption.cpp b/src/config/option/hostportoption.cpp index 43557c4..aba8c35 100644 --- a/src/config/option/hostportoption.cpp +++ b/src/config/option/hostportoption.cpp @@ -23,11 +23,12 @@ #include #include -#include #include #include +#include "boost_assert_handler.h" + using namespace std; using boost::program_options::value; using boost::program_options::variables_map; diff --git a/src/config/option/hostsourcenetworkinterfaceoption.cpp b/src/config/option/hostsourcenetworkinterfaceoption.cpp index f18e19d..f1d07b3 100644 --- a/src/config/option/hostsourcenetworkinterfaceoption.cpp +++ b/src/config/option/hostsourcenetworkinterfaceoption.cpp @@ -22,11 +22,12 @@ #include -#include #include #include +#include "boost_assert_handler.h" + using namespace std; using boost::program_options::value; using boost::program_options::variables_map; diff --git a/src/dns/dnsresolver.cpp b/src/dns/dnsresolver.cpp index f189930..83615d6 100644 --- a/src/dns/dnsresolver.cpp +++ b/src/dns/dnsresolver.cpp @@ -22,7 +22,6 @@ on this file might be covered by the GNU General Public License. #include #include -#include #include #include #include @@ -30,6 +29,7 @@ on this file might be covered by the GNU General Public License. #include +#include "boost_assert_handler.h" #include "dns/hostaddress.h" using namespace std; diff --git a/src/dns/dnsresolverfactory.cpp b/src/dns/dnsresolverfactory.cpp index 900cbf3..89a29e6 100644 --- a/src/dns/dnsresolverfactory.cpp +++ b/src/dns/dnsresolverfactory.cpp @@ -22,6 +22,8 @@ #include +#include "boost_assert_handler.h" + using namespace std; using boost::net::dns::type_t; diff --git a/src/dns/hostaddress.cpp b/src/dns/hostaddress.cpp index 7e94270..ebc01ad 100644 --- a/src/dns/hostaddress.cpp +++ b/src/dns/hostaddress.cpp @@ -19,9 +19,10 @@ on this file might be covered by the GNU General Public License. */ #include "dns/hostaddress.h" -#include #include +#include "boost_assert_handler.h" + using namespace std; using boost::asio::ip::address; diff --git a/src/dns/timetolive.cpp b/src/dns/timetolive.cpp index a32c9e2..1497042 100644 --- a/src/dns/timetolive.cpp +++ b/src/dns/timetolive.cpp @@ -19,7 +19,7 @@ on this file might be covered by the GNU General Public License. */ #include "dns/timetolive.h" -#include +#include "boost_assert_handler.h" using boost::date_time::time_resolution_traits_adapted64_impl; using boost::posix_time::microsec_clock; diff --git a/src/host/hoststatus.cpp b/src/host/hoststatus.cpp index 31b88e3..f6a0257 100644 --- a/src/host/hoststatus.cpp +++ b/src/host/hoststatus.cpp @@ -21,7 +21,7 @@ on this file might be covered by the GNU General Public License. #include -#include +#include "boost_assert_handler.h" using namespace std; diff --git a/src/host/loglevel.cpp b/src/host/loglevel.cpp index 52982d2..6a90cfb 100644 --- a/src/host/loglevel.cpp +++ b/src/host/loglevel.cpp @@ -23,7 +23,7 @@ on this file might be covered by the GNU General Public License. #include #include -#include +#include "boost_assert_handler.h" using namespace std; using I2n::Logger::LogLevel; diff --git a/src/host/logoutput.cpp b/src/host/logoutput.cpp index cbc4970..8104d0e 100644 --- a/src/host/logoutput.cpp +++ b/src/host/logoutput.cpp @@ -23,7 +23,7 @@ on this file might be covered by the GNU General Public License. #include #include -#include +#include "boost_assert_handler.h" using namespace std; diff --git a/src/host/messagepayload.cpp b/src/host/messagepayload.cpp index ad9b442..4021004 100644 --- a/src/host/messagepayload.cpp +++ b/src/host/messagepayload.cpp @@ -1,5 +1,6 @@ // Copyright (c) 2003-2010 Christopher M. Kohlhoff // Modifications (c) 2011 by Guilherme Maciel Ferreira / Intra2net AG +// and (c) 2014 by Christian Herdtweck / Intra2net AG // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at @@ -9,10 +10,10 @@ #include #include -#include - #include +#include "boost_assert_handler.h" + using namespace std; using I2n::Logger::GlobalLogger; diff --git a/src/host/networkinterface.hpp b/src/host/networkinterface.hpp index 09c16d2..8f40122 100644 --- a/src/host/networkinterface.hpp +++ b/src/host/networkinterface.hpp @@ -32,7 +32,6 @@ #include -#include #include #include #include @@ -41,6 +40,7 @@ #include +#include "boost_assert_handler.h" #include "host/networkinterfacelist.h" typedef const struct sockaddr* const_sockaddr_ptr_t; diff --git a/src/host/networkinterfacelist.cpp b/src/host/networkinterfacelist.cpp index e7b2e47..8e30fcd 100644 --- a/src/host/networkinterfacelist.cpp +++ b/src/host/networkinterfacelist.cpp @@ -22,10 +22,10 @@ #include -#include - #include +#include "boost_assert_handler.h" + using namespace std; using I2n::Logger::GlobalLogger; diff --git a/src/host/pingerfactory.cpp b/src/host/pingerfactory.cpp index 9203b42..24f2bcd 100644 --- a/src/host/pingerfactory.cpp +++ b/src/host/pingerfactory.cpp @@ -27,6 +27,7 @@ #include #include +#include "boost_assert_handler.h" #include "icmp/icmppinger.h" #include "tcp/tcppinger.h" diff --git a/src/host/pinginterval.cpp b/src/host/pinginterval.cpp index 2f0d5e6..cadc3f4 100644 --- a/src/host/pinginterval.cpp +++ b/src/host/pinginterval.cpp @@ -19,7 +19,7 @@ on this file might be covered by the GNU General Public License. */ #include "host/pinginterval.h" -#include +#include "boost_assert_handler.h" //----------------------------------------------------------------------------- // PingInterval diff --git a/src/host/pingprotocol.cpp b/src/host/pingprotocol.cpp index ea7e66b..6e57c87 100644 --- a/src/host/pingprotocol.cpp +++ b/src/host/pingprotocol.cpp @@ -23,7 +23,7 @@ on this file might be covered by the GNU General Public License. #include #include -#include +#include "boost_assert_handler.h" using namespace std; diff --git a/src/host/pingrotate.cpp b/src/host/pingrotate.cpp index b000658..9ad8987 100644 --- a/src/host/pingrotate.cpp +++ b/src/host/pingrotate.cpp @@ -20,9 +20,9 @@ #include "host/pingrotate.h" -#include #include +#include "boost_assert_handler.h" #include "dns/dnsresolverfactory.h" #include "host/pingerfactory.h" diff --git a/src/host/pingscheduler.cpp b/src/host/pingscheduler.cpp index d4624e9..d106452 100644 --- a/src/host/pingscheduler.cpp +++ b/src/host/pingscheduler.cpp @@ -26,6 +26,7 @@ on this file might be covered by the GNU General Public License. #include +#include "boost_assert_handler.h" #include "dns/dnsresolver.h" #include "host/pingerfactory.h" #include "icmp/icmppinger.h" diff --git a/src/icmp/icmppacketfactory.cpp b/src/icmp/icmppacketfactory.cpp index 3488f02..277a980 100644 --- a/src/icmp/icmppacketfactory.cpp +++ b/src/icmp/icmppacketfactory.cpp @@ -20,10 +20,10 @@ #include "icmp/icmppacketfactory.h" -#include #include +#include "boost_assert_handler.h" #include "icmp/icmpchecksum.h" #include "icmp/icmpdata.h" #include "icmp/icmptype.h" diff --git a/src/icmp/icmppinger.cpp b/src/icmp/icmppinger.cpp index 3329913..6899c6b 100644 --- a/src/icmp/icmppinger.cpp +++ b/src/icmp/icmppinger.cpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include @@ -21,6 +20,7 @@ #include +#include "boost_assert_handler.h" #include "icmp/icmppacketfactory.h" using namespace std; diff --git a/src/icmp/icmpv4header.cpp b/src/icmp/icmpv4header.cpp index fcfcd51..27f9a71 100644 --- a/src/icmp/icmpv4header.cpp +++ b/src/icmp/icmpv4header.cpp @@ -6,6 +6,7 @@ // http://www.boost.org/LICENSE_1_0.txt) #include "icmp/icmpv4header.h" +#include "boost_assert_handler.h" #include "icmp/icmpdestinationunreachablemessage.h" #include "icmp/icmpechoreplymessage.h" #include "icmp/icmpechorequestmessage.h" diff --git a/src/icmp/icmpv4packet.cpp b/src/icmp/icmpv4packet.cpp index 9b52e38..05f1b50 100644 --- a/src/icmp/icmpv4packet.cpp +++ b/src/icmp/icmpv4packet.cpp @@ -8,10 +8,10 @@ #include -#include - #include +#include "boost_assert_handler.h" + using namespace std; using boost::asio::ip::address; using boost::date_time::time_resolution_traits_adapted64_impl; diff --git a/src/icmp/icmpv6header.cpp b/src/icmp/icmpv6header.cpp index 0438093..e3d2950 100644 --- a/src/icmp/icmpv6header.cpp +++ b/src/icmp/icmpv6header.cpp @@ -6,6 +6,7 @@ // http://www.boost.org/LICENSE_1_0.txt) #include "icmp/icmpv6header.h" +#include "boost_assert_handler.h" #include "icmp/icmpdestinationunreachablemessage.h" #include "icmp/icmpechoreplymessage.h" #include "icmp/icmpechorequestmessage.h" diff --git a/src/icmp/icmpv6packet.cpp b/src/icmp/icmpv6packet.cpp index 7f78170..5d22e90 100644 --- a/src/icmp/icmpv6packet.cpp +++ b/src/icmp/icmpv6packet.cpp @@ -8,10 +8,10 @@ #include -#include - #include +#include "boost_assert_handler.h" + using namespace std; using boost::asio::ip::address; using boost::date_time::time_resolution_traits_adapted64_impl; diff --git a/src/ip/ipv6header.cpp b/src/ip/ipv6header.cpp index f5ddc82..c154a78 100644 --- a/src/ip/ipv6header.cpp +++ b/src/ip/ipv6header.cpp @@ -6,10 +6,11 @@ // http://www.boost.org/LICENSE_1_0.txt) #include "ip/ipv6header.h" -#include #include #include +#include "boost_assert_handler.h" + using namespace std; using boost::asio::ip::address_v6; using boost::scoped_array; diff --git a/src/link/linkstatus.cpp b/src/link/linkstatus.cpp index 71ef3bc..e7b8004 100644 --- a/src/link/linkstatus.cpp +++ b/src/link/linkstatus.cpp @@ -21,10 +21,10 @@ on this file might be covered by the GNU General Public License. #include -#include - #include +#include "boost_assert_handler.h" + using namespace std; using boost::lock_guard; using boost::mutex; diff --git a/src/link/statusnotifiercommand.cpp b/src/link/statusnotifiercommand.cpp index 3372e8c..20d4051 100644 --- a/src/link/statusnotifiercommand.cpp +++ b/src/link/statusnotifiercommand.cpp @@ -23,12 +23,13 @@ on this file might be covered by the GNU General Public License. #include -#include #include #include #include +#include "boost_assert_handler.h" + using namespace std; using I2n::Logger::GlobalLogger; diff --git a/src/main.cpp b/src/main.cpp index 836520c..187fb07 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,6 +32,7 @@ on this file might be covered by the GNU General Public License. #include #include +#include "boost_assert_handler.h" #include "config/configurationreader.h" #include "config/host.h" #include "link/linkstatus.h" @@ -40,6 +41,7 @@ on this file might be covered by the GNU General Public License. #include "host/pingprotocol.h" #include "host/pingscheduler.h" + using namespace std; using boost::asio::io_service; using boost::shared_ptr; diff --git a/src/tcp/tcpheader.cpp b/src/tcp/tcpheader.cpp index 46361fb..ac820af 100644 --- a/src/tcp/tcpheader.cpp +++ b/src/tcp/tcpheader.cpp @@ -25,8 +25,7 @@ on this file might be covered by the GNU General Public License. #include -#include - +#include "boost_assert_handler.h" #include "ip/pseudoipv4header.h" #include "ip/pseudoipv6header.h" diff --git a/src/tcp/tcpipv4segment.cpp b/src/tcp/tcpipv4segment.cpp index a05d5fe..f27609b 100644 --- a/src/tcp/tcpipv4segment.cpp +++ b/src/tcp/tcpipv4segment.cpp @@ -20,10 +20,10 @@ #include "tcp/tcpipv4segment.h" -#include - #include +#include "boost_assert_handler.h" + using namespace std; using boost::asio::ip::address; using boost::date_time::time_resolution_traits_adapted64_impl; diff --git a/src/tcp/tcpipv6segment.cpp b/src/tcp/tcpipv6segment.cpp index ac706b4..0b412af 100644 --- a/src/tcp/tcpipv6segment.cpp +++ b/src/tcp/tcpipv6segment.cpp @@ -20,10 +20,10 @@ #include "tcp/tcpipv6segment.h" -#include - #include +#include "boost_assert_handler.h" + using namespace std; using boost::asio::ip::address; using boost::date_time::time_resolution_traits_adapted64_impl; diff --git a/src/tcp/tcppinger.cpp b/src/tcp/tcppinger.cpp index 9a1b466..ade4d30 100644 --- a/src/tcp/tcppinger.cpp +++ b/src/tcp/tcppinger.cpp @@ -28,7 +28,6 @@ on this file might be covered by the GNU General Public License. #include #include -#include #include #include #include @@ -37,6 +36,7 @@ on this file might be covered by the GNU General Public License. #include +#include "boost_assert_handler.h" #include "tcp/tcpsegmentfactory.h" using namespace std; diff --git a/src/tcp/tcpsegmentfactory.cpp b/src/tcp/tcpsegmentfactory.cpp index da90b30..5d6bcde 100644 --- a/src/tcp/tcpsegmentfactory.cpp +++ b/src/tcp/tcpsegmentfactory.cpp @@ -20,10 +20,9 @@ #include "tcp/tcpsegmentfactory.h" -#include - #include +#include "boost_assert_handler.h" #include "tcp/tcpheader.h" #include "tcp/tcpipv4segment.h" #include "tcp/tcpipv6segment.h" diff --git a/test/CMakeLists.test_configurationcommandline.txt b/test/CMakeLists.test_configurationcommandline.txt index 0567483..e8ffe65 100644 --- a/test/CMakeLists.test_configurationcommandline.txt +++ b/test/CMakeLists.test_configurationcommandline.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_configurationcommandline test_configurationcommandline.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/config/configurationcommandline.cpp ${CMAKE_SOURCE_DIR}/src/config/configurationinterface.cpp ${CMAKE_SOURCE_DIR}/src/config/configurationoptions.cpp diff --git a/test/CMakeLists.test_configurationfile.txt b/test/CMakeLists.test_configurationfile.txt index ee71cb1..3c95c94 100644 --- a/test/CMakeLists.test_configurationfile.txt +++ b/test/CMakeLists.test_configurationfile.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_configurationfile test_configurationfile.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/config/configurationfile.cpp ${CMAKE_SOURCE_DIR}/src/config/configurationinterface.cpp ${CMAKE_SOURCE_DIR}/src/config/configurationoptions.cpp diff --git a/test/CMakeLists.test_configurationoptions.txt b/test/CMakeLists.test_configurationoptions.txt index 38f251b..94d69f6 100644 --- a/test/CMakeLists.test_configurationoptions.txt +++ b/test/CMakeLists.test_configurationoptions.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_configurationoptions test_configurationoptions.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/config/configurationoptions.cpp ${CMAKE_SOURCE_DIR}/src/config/configuration.cpp ${CMAKE_SOURCE_DIR}/src/config/host.cpp diff --git a/test/CMakeLists.test_hoststatus.txt b/test/CMakeLists.test_hoststatus.txt index 2261a76..097a23e 100644 --- a/test/CMakeLists.test_hoststatus.txt +++ b/test/CMakeLists.test_hoststatus.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_hoststatus test_hoststatus.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/host/hoststatus.cpp ) diff --git a/test/CMakeLists.test_icmpv4header.txt b/test/CMakeLists.test_icmpv4header.txt index 1e3cde4..4b58904 100644 --- a/test/CMakeLists.test_icmpv4header.txt +++ b/test/CMakeLists.test_icmpv4header.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_icmpv4header test_icmpv4header.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/icmp/icmpv4header.cpp ${CMAKE_SOURCE_DIR}/src/icmp/icmpmessage.cpp ${CMAKE_SOURCE_DIR}/src/icmp/icmpdestinationunreachablemessage.cpp diff --git a/test/CMakeLists.test_icmpv6header.txt b/test/CMakeLists.test_icmpv6header.txt index 53e309c..730f052 100644 --- a/test/CMakeLists.test_icmpv6header.txt +++ b/test/CMakeLists.test_icmpv6header.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_icmpv6header test_icmpv6header.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/icmp/icmpv6header.cpp ${CMAKE_SOURCE_DIR}/src/icmp/icmpmessage.cpp ${CMAKE_SOURCE_DIR}/src/icmp/icmpdestinationunreachablemessage.cpp diff --git a/test/CMakeLists.test_ipv4header.txt b/test/CMakeLists.test_ipv4header.txt index d97cdd6..ff48865 100644 --- a/test/CMakeLists.test_ipv4header.txt +++ b/test/CMakeLists.test_ipv4header.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_ipv4header test_ipv4header.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/ip/ipv4header.cpp ${CMAKE_SOURCE_DIR}/src/host/messagepayload.cpp ) diff --git a/test/CMakeLists.test_ipv6header.txt b/test/CMakeLists.test_ipv6header.txt index 4f308bd..5fcae97 100644 --- a/test/CMakeLists.test_ipv6header.txt +++ b/test/CMakeLists.test_ipv6header.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_ipv6header test_ipv6header.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/ip/ipv6header.cpp ${CMAKE_SOURCE_DIR}/src/host/messagepayload.cpp ) diff --git a/test/CMakeLists.test_linkstatus.txt b/test/CMakeLists.test_linkstatus.txt index df6b5da..d4f8c7c 100644 --- a/test/CMakeLists.test_linkstatus.txt +++ b/test/CMakeLists.test_linkstatus.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_linkstatus test_linkstatus + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/link/linkstatus.cpp ) diff --git a/test/CMakeLists.test_loglevel.txt b/test/CMakeLists.test_loglevel.txt index 86da955..236a9bd 100644 --- a/test/CMakeLists.test_loglevel.txt +++ b/test/CMakeLists.test_loglevel.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_loglevel test_loglevel.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/host/loglevel.cpp ) diff --git a/test/CMakeLists.test_logoutput.txt b/test/CMakeLists.test_logoutput.txt index 97f76d7..ef7ea3f 100644 --- a/test/CMakeLists.test_logoutput.txt +++ b/test/CMakeLists.test_logoutput.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_logoutput test_logoutput.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/host/logoutput.cpp ) diff --git a/test/CMakeLists.test_messagepayload.txt b/test/CMakeLists.test_messagepayload.txt index fa555a7..99ff27e 100644 --- a/test/CMakeLists.test_messagepayload.txt +++ b/test/CMakeLists.test_messagepayload.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_messagepayload test_messagepayload.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/host/messagepayload.cpp ) diff --git a/test/CMakeLists.test_pingprotocol.txt b/test/CMakeLists.test_pingprotocol.txt index bc95fd1..e65c6dc 100644 --- a/test/CMakeLists.test_pingprotocol.txt +++ b/test/CMakeLists.test_pingprotocol.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_pingprotocol test_pingprotocol.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/host/pingprotocol.cpp ) diff --git a/test/CMakeLists.test_tcpheader.txt b/test/CMakeLists.test_tcpheader.txt index 3df0853..3f69afe 100644 --- a/test/CMakeLists.test_tcpheader.txt +++ b/test/CMakeLists.test_tcpheader.txt @@ -1,6 +1,7 @@ # compiler: creates the binaries add_executable(test_tcpheader test_tcpheader.cpp + ${CMAKE_SOURCE_DIR}/src/boost_assert_handler.cpp ${CMAKE_SOURCE_DIR}/src/tcp/tcpheader.cpp ${CMAKE_SOURCE_DIR}/src/host/messagepayload.cpp ) -- 1.7.1