build: various updates
* Upgrade waf to 2.0.14
* Sync default compiler flags with ndn-cxx
* Remove unused pch waf tool
* Simplify compilation of unit-tests
Change-Id: I2aa21454dd5d691ad2093923582443e5f8329ba7
diff --git a/tests/boost-test.hpp b/tests/boost-test.hpp
index e3204c4..95aa881 100644
--- a/tests/boost-test.hpp
+++ b/tests/boost-test.hpp
@@ -1,5 +1,5 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
* Copyright (c) 2014-2019, The University of Memphis
*
* This file is part of PSync.
@@ -17,8 +17,7 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*
* \author Yingdi Yu <yingdi@cs.ucla.edu>
- *
- **/
+ */
#ifndef PSYNC_TESTS_BOOST_TEST_HPP
#define PSYNC_TESTS_BOOST_TEST_HPP
@@ -27,8 +26,7 @@
#pragma GCC system_header
#pragma clang system_header
+#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
-#include <boost/concept_check.hpp>
-#include <boost/test/output_test_stream.hpp>
#endif // PSYNC_TESTS_BOOST_TEST_HPP
diff --git a/tests/main.cpp b/tests/main.cpp
index 2b836ad..eb01a05 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -1,5 +1,5 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
* Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
@@ -23,8 +23,7 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#define BOOST_TEST_DYN_LINK
-#define BOOST_TEST_ALTERNATIVE_INIT_API
+#define BOOST_TEST_MODULE PSync
#include <boost/version.hpp>
@@ -32,9 +31,9 @@
// Boost.Test v3.3 (Boost 1.62) natively supports multi-logger output
#include "boost-test.hpp"
#else
+#define BOOST_TEST_ALTERNATIVE_INIT_API
#define BOOST_TEST_NO_MAIN
#include "boost-test.hpp"
-
#include "boost-multi-log-formatter.hpp"
#include <boost/program_options/options_description.hpp>
diff --git a/tests/wscript b/tests/wscript
index facae68..65c5eeb 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -4,19 +4,8 @@
if not bld.env['WITH_TESTS']:
return
- bld(
- features='cxx',
- name='unit-tests-main',
- target='unit-tests-main',
- source='main.cpp',
- defines=['BOOST_TEST_MODULE=PSync Unit Tests'],
- use='PSync'
- )
-
- bld.program(
- target='../unit-tests',
- features='cxx cxxprogram',
- source=bld.path.ant_glob(['**/*.cpp'], excl=['main.cpp']),
- use='PSync unit-tests-main',
- install_path=None,
- )
+ bld.program(target='../unit-tests',
+ name='unit-tests',
+ source=bld.path.ant_glob('**/*.cpp'),
+ use='PSync',
+ install_path=None)