Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use boost 1.73 #867

Merged
merged 2 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ brew 'cmake'
brew 'ccache'
brew 'python3'
brew 'imagemagick'
brew 'p7zip'
brew 'p7zip'
brew 'boost'
2 changes: 1 addition & 1 deletion CMakeModules/FindBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ else()
# _Boost_COMPONENT_HEADERS. See the instructions at the top of
# _Boost_COMPONENT_DEPENDENCIES.
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
"1.72.0" "1.72" "1.70.0" "1.70" "1.69.0" "1.69"
"1.74.0" "1.74" "1.73.0" "1.73" "1.72.0" "1.72" "1.70.0" "1.70" "1.69.0" "1.69"
"1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
"1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
"1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
Expand Down
6 changes: 3 additions & 3 deletions CMakeModules/boost.cmake
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
if (NOT BUILD_SHARED_LIBS)
set(Boost_USE_STATIC_LIBS ON)
endif()
find_package(Boost 1.72 COMPONENTS chrono system filesystem thread regex date_time program_options OPTIONAL_COMPONENTS python27)
find_package(Boost 1.73 COMPONENTS chrono system filesystem thread regex date_time program_options OPTIONAL_COMPONENTS python27)
add_definitions(-DBOOST_ALL_NO_LIB)
if(WIN32)
add_definitions(-DBOOST_USE_WINDOWS_H)
endif()
if(NOT WIN32 AND NOT Boost_FOUND)
include( ExternalProject )
set( boost_URL "http://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz" )
set( boost_SHA256 "c66e88d5786f2ca4dbebb14e06b566fb642a1a6947ad8cc9091f9f445134143f" )
set( boost_URL "http://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.gz" )
set( boost_SHA256 "9995e192e68528793755692917f9eb6422f3052a53c5e13ba278a228af6c7acf" )
set( boost_bootstrap ./bootstrap.sh)
set( boost_b2 ./b2 )
set( boost_INSTALL ${CMAKE_BINARY_DIR}/third_party/boost )
Expand Down
8 changes: 6 additions & 2 deletions aseba/thymio-device-manager/aseba_node_registery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,13 @@ aseba_node_registery::node_map aseba_node_registery::nodes() const {

void aseba_node_registery::set_tcp_endpoint(const boost::asio::ip::tcp::endpoint& endpoint) {
m_nodes_service_desc.endpoint(endpoint);
update_discovery();
}

void aseba_node_registery::set_ws_endpoint(const boost::asio::ip::tcp::endpoint& endpoint) {
m_ws_endpoint = endpoint;
}

void aseba_node_registery::set_discovery() {
update_discovery();
}

Expand All @@ -134,10 +136,12 @@ void aseba_node_registery::update_discovery() {
void aseba_node_registery::on_update_discovery_complete(const boost::system::error_code& ec) {
if(ec) {
mLogError("Discovery : {}", ec.message());
m_discovery_needs_update = true;
} else {
mLogTrace("Discovery : update complete");
m_updating_discovery = false;
}
m_updating_discovery = false;
if(m_discovery_needs_update) {
boost::asio::post(boost::asio::get_associated_executor(this),
boost::bind(&aseba_node_registery::update_discovery, this));
Expand Down
1 change: 1 addition & 0 deletions aseba/thymio-device-manager/aseba_node_registery.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class aseba_node_registery : public boost::asio::detail::service_base<aseba_node

void set_tcp_endpoint(const boost::asio::ip::tcp::endpoint& endpoint);
void set_ws_endpoint(const boost::asio::ip::tcp::endpoint& endpoint);
void set_discovery();

node_map nodes() const;
std::shared_ptr<aseba_node> node_from_id(const node_id&) const;
Expand Down
6 changes: 5 additions & 1 deletion aseba/thymio-device-manager/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ void run_service(boost::asio::io_context& ctx) {

// Create a server for websocket
mobsya::application_server<mobsya::websocket_t> websocket_server(ctx, 8597);
node_registery.set_ws_endpoint(websocket_server.endpoint());
websocket_server.accept();
node_registery.set_ws_endpoint(websocket_server.endpoint());

// Enable Bonjour, Zeroconf
node_registery.set_discovery();


#ifdef MOBSYA_TDM_ENABLE_USB
mobsya::usb_server usb_server(ctx, {mobsya::THYMIO2_DEVICE_ID, mobsya::THYMIO_WIRELESS_DEVICE_ID});
Expand Down
2 changes: 1 addition & 1 deletion aseba/thymio-device-manager/serialacceptor_osx.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "serialacceptor.h"
#include <algorithm>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/beast/core/bind_handler.hpp>
#include "log.h"

Expand Down
2 changes: 1 addition & 1 deletion aseba/thymio-device-manager/serialacceptor_udev.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "serialacceptor.h"
#include <algorithm>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/beast/core/bind_handler.hpp>
#include <boost/thread/thread.hpp>
#include <boost/scope_exit.hpp>
Expand Down
2 changes: 1 addition & 1 deletion aseba/thymio-device-manager/serialacceptor_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <algorithm>
#include <charconv>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/beast/core/bind_handler.hpp>
#include "log.h"

Expand Down
2 changes: 1 addition & 1 deletion aseba/thymio-device-manager/system_sleep_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <boost/asio/io_service.hpp>
#include <boost/asio/deadline_timer.hpp>
#include <vector>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/chrono.hpp>

#ifdef __APPLE__
Expand Down
2 changes: 1 addition & 1 deletion aseba/thymio-device-manager/usbdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <boost/beast/core/bind_handler.hpp>
#include <boost/beast/core/detail/type_traits.hpp>
#include <boost/beast/core.hpp>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <map>

// Include asio before libusb !
Expand Down
4 changes: 2 additions & 2 deletions aseba/thymio-device-manager/wireless_configurator_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ void wireless_configurator_service::enable() {

#ifdef MOBSYA_TDM_ENABLE_SERIAL
auto& service = boost::asio::use_service<serial_acceptor_service>(this->m_ctx);
service.device_unplugged.connect(boost::bind(&wireless_configurator_service::device_unplugged, this, _1));
service.device_unplugged.connect(boost::bind(&wireless_configurator_service::device_unplugged, this, boost::placeholders::_1));
#endif

#ifdef MOBSYA_TDM_ENABLE_USB
auto& service = boost::asio::use_service<usb_acceptor_service>(this->m_ctx);
service.device_unplugged.connect(boost::bind(&wireless_configurator_service::device_unplugged, this, _1));
service.device_unplugged.connect(boost::bind(&wireless_configurator_service::device_unplugged, this, boost::placeholders::_1));
#endif
}

Expand Down
7 changes: 1 addition & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ variables:
- name: vpl3_url
value: "https://github.com/Mobsya/ci-data/releases/download/data/vpl3-thymio-suite.tar.gz"
- name: vcpkg_commit
value: "c4f0372c638831d8d524feb1039611852eca6512"
value: "cccef600decd1091a20a0b4d8a2e61f7041eb686"
- name: visual_bootstrapper
value: "https://github.com/Mobsya/ci-data/releases/download/data/vs_enterprise.exe"

Expand Down Expand Up @@ -211,11 +211,6 @@ jobs:
brew switch qt 5.13.2
displayName: 'Setting Qt version to 5.13.2'

- script: |
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/ae73ba09216a7f8b2c0503e57221db020bcd3471/Formula/boost.rb
brew switch boost 1.72.0
displayName: 'Setting Boost version to 1.72.0'

- script: |
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
brew info openssl
Expand Down
4 changes: 2 additions & 2 deletions flatpak/org.mobsya.ThymioSuite.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"sources": [
{
"type": "archive",
"url": "http://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz",
"sha256": "c66e88d5786f2ca4dbebb14e06b566fb642a1a6947ad8cc9091f9f445134143f"
"url": "http://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.gz",
"sha256": "9995e192e68528793755692917f9eb6422f3052a53c5e13ba278a228af6c7acf"
}
],
"buildsystem": "simple",
Expand Down