From 5a19c9a5a180ed115e82f68fd46a5385fc660b04 Mon Sep 17 00:00:00 2001 From: arvidn Date: Sat, 25 Feb 2017 14:09:11 -0500 Subject: [PATCH] fix makefile --- .travis.yml | 12 +++++++++++- examples/Makefile.am | 2 ++ include/libtorrent/alert_types.hpp | 4 ++-- include/libtorrent/aux_/file_progress.hpp | 2 +- test/Makefile.am | 3 ++- test/test_ed25519.cpp | 2 +- 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2d6cdff96..bd313435e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ matrix: - env: variant=test_release lang=cpp11 sim=0 coverage=1 docs=1 - env: variant=test_debug lang=sanitizer sim=1 coverage=0 - env: variant=test_debug lang=cpp98 sim=0 coverage=0 - - env: variant=test_barebones lang=cpp11 sim=0 coverage=0 + - env: variant=test_barebones lang=cpp11 sim=0 coverage=0 autotools=1 - env: variant=test_debug lang=cpp11 sim=0 coverage=0 target=osx-tests os: osx @@ -113,6 +113,16 @@ script: fi - cd .. +# run through autotools and ./configure to make sure it works + - 'if [[ "$autotools" == "1" ]]; then + ./autotool.sh && + export CXX=g++-5 && + export CC=gcc-5 && + export CXXFLAGS="-Werror -Wno-deprecated-declarations" && + ./configure --enable-debug --enable-encryption --enable-examples --enable-tests --enable-python-binding && + make -j2; + fi' + # build libtorrent separately and install it in a temporary (well known) dir # we have to do this because on linux the name of the python module is the same # as the main library, so we can't stage them to the same directory diff --git a/examples/Makefile.am b/examples/Makefile.am index f786fc8e6..5b65febbf 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -20,6 +20,8 @@ client_test_SOURCES = client_test.cpp print.cpp session_view.cpp torrent_view.cp stats_counters_SOURCES = stats_counters.cpp bt_get_SOURCES = bt-get.cpp bt_get2_SOURCES = bt-get2.cpp +bt_get_CXXFLAGS = -std=c++11 +bt_get2_CXXFLAGS = -std=c++11 dump_torrent_SOURCES = dump_torrent.cpp make_torrent_SOURCES = make_torrent.cpp simple_client_SOURCES = simple_client.cpp diff --git a/include/libtorrent/alert_types.hpp b/include/libtorrent/alert_types.hpp index 0bddfa547..ab482b443 100644 --- a/include/libtorrent/alert_types.hpp +++ b/include/libtorrent/alert_types.hpp @@ -2452,6 +2452,8 @@ namespace libtorrent // picker_log_notification). struct TORRENT_EXPORT picker_log_alert TORRENT_FINAL : peer_alert { + TORRENT_DEFINE_ALERT(picker_log_alert, 89) + #ifndef TORRENT_DISABLE_LOGGING // internal @@ -2459,8 +2461,6 @@ namespace libtorrent , tcp::endpoint const& ep, peer_id const& peer_id, boost::uint32_t flags , piece_block const* blocks, int num_blocks); - TORRENT_DEFINE_ALERT(picker_log_alert, 89) - static const int static_category = alert::picker_log_notification; virtual std::string message() const TORRENT_OVERRIDE; diff --git a/include/libtorrent/aux_/file_progress.hpp b/include/libtorrent/aux_/file_progress.hpp index c56e0fd11..f8926b457 100644 --- a/include/libtorrent/aux_/file_progress.hpp +++ b/include/libtorrent/aux_/file_progress.hpp @@ -84,7 +84,7 @@ namespace aux // to make sure we never say we've downloaded more bytes of a file than // its file size - std::vector m_file_sizes; + std::vector m_file_sizes; #endif }; diff --git a/test/Makefile.am b/test/Makefile.am index 69950084f..b7b6cc0f1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -47,7 +47,7 @@ test_programs = \ test_file_progress \ test_linked_list \ test_direct_dht \ - test_ed25519.cpp + test_ed25519 if ENABLE_TESTS check_PROGRAMS = $(test_programs) $(benchmark_programs) @@ -234,6 +234,7 @@ test_remap_files_SOURCES = test_remap_files.cpp test_file_progress_SOURCES = test_file_progress.cpp test_linked_list_SOURCES = test_linked_list.cpp test_direct_dht_SOURCES = test_direct_dht.cpp +test_ed25519_SOURCES = test_ed25519.cpp LDADD = libtest.la $(top_builddir)/src/libtorrent-rasterbar.la diff --git a/test/test_ed25519.cpp b/test/test_ed25519.cpp index 5bebe69d4..d3ade1771 100644 --- a/test/test_ed25519.cpp +++ b/test/test_ed25519.cpp @@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE. #include -#include +#include "libtorrent/ed25519.hpp" #include "libtorrent/hex.hpp" using namespace libtorrent;