Skip to content

Commit

Permalink
Release v0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
arobenko committed Apr 27, 2020
2 parents 05e1077 + 6632d0b commit 700950e
Show file tree
Hide file tree
Showing 14 changed files with 229 additions and 48 deletions.
23 changes: 15 additions & 8 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
image:
- Visual Studio 2019
- Visual Studio 2017
- Visual Studio 2015
- Visual Studio 2017

init:
- git config --global core.autocrlf input

clone_folder: c:\projects\cc.demo1.commsdsl
shallow_clone: true

matrix:
fast_finish: false

platform:
- x64
- x86
Expand All @@ -22,11 +20,20 @@ configuration:
environment:
matrix:
- CPP_STD: 11
QT_VER: 5.6.3
- CPP_STD: 14
QT_VER: 5.6.3
- CPP_STD: 17
- CPP_STD: 20

matrix:
fast_finish: false
exclude:
- image: Visual Studio 2015
CPP_STD: 17
- image: Visual Studio 2015
CPP_STD: 20
- image: Visual Studio 2017
CPP_STD: 20

install:
- call script\appveyor_install.bat
- set PATH=%PATH%;%QTDIR%\bin
Expand All @@ -36,7 +43,7 @@ build_script:
- if exist %BUILD_DIR% rmdir /S /Q %BUILD_DIR%
- mkdir %BUILD_DIR%
- cd %BUILD_DIR%
- cmake .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "NMake Makefiles" -DBOOST_ROOT="C:/Libraries/boost_1_65_1" -DBoost_USE_STATIC_LIBS=ON
- cmake .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "NMake Makefiles" -DBOOST_ROOT="%BOOST_DIR%" -DBoost_USE_STATIC_LIBS=ON
- nmake
- mkdir output.build
- cd output.build
Expand Down
131 changes: 112 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
dist: bionic
dist: xenial
language: cpp
sudo: true
notifications:
email:
recipients:
- arobenko@gmail.com
on_success: change
on_failure: always

Expand Down Expand Up @@ -33,142 +31,237 @@ matrix:
- os: linux
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- g++-6
env: _CC=gcc-6 _CXX=g++-6 _DSL_CC=${_CC} _DSL_CXX=${_CXX}
- os: linux
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- g++-6
env: _CC=gcc-6 _CXX=g++-6 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=14"
- os: linux
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- g++-7
env: _CC=gcc-7 _CXX=g++-7 _DSL_CC=${_CC} _DSL_CXX=${_CXX}
- os: linux
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- g++-7
env: _CC=gcc-7 _CXX=g++-7 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=14"
- os: linux
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- g++-7
env: _CC=gcc-7 _CXX=g++-7 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=17"
- os: linux
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- g++-8
env: _CC=gcc-8 _CXX=g++-8 _DSL_CC=${_CC} _DSL_CXX=${_CXX}
- os: linux
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- g++-8
env: _CC=gcc-8 _CXX=g++-8 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=14"
env: _CC=gcc-8 _CXX=g++-8 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=14"
- os: linux
env: _CC=gcc-9 _CXX=g++-9 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _USE_GCC9=1
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- g++-8
env: _CC=gcc-8 _CXX=g++-8 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=17"
- os: linux
env: _CC=gcc-9 _CXX=g++-9 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _USE_GCC9=1 _BUILD="-DCMAKE_CXX_STANDARD=14"
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- g++-9
env: _CC=gcc-9 _CXX=g++-9 _DSL_CC=${_CC} _DSL_CXX=${_CXX}
- os: linux
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- g++-9
env: _CC=gcc-9 _CXX=g++-9 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=14"
- os: linux
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- g++-9
env: _CC=gcc-9 _CXX=g++-9 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=17"
- os: linux
addons:
apt:
sources:
- sourceline: "ppa:ubuntu-toolchain-r/test"
packages:
- g++-9
env: _CC=gcc-9 _CXX=g++-9 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=20"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-3.9
- llvm-toolchain-xenial-3.9
packages:
- clang-3.9
env: _CC=clang-3.9 _CXX=clang++-3.9 _DSL_CC=${_CC} _DSL_CXX=${_CXX}
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-3.9
- llvm-toolchain-xenial-3.9
packages:
- clang-3.9
env: _CC=clang-3.9 _CXX=clang++-3.9 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=14"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-4.0
- llvm-toolchain-xenial-4.0
packages:
- clang-4.0
env: _CC=clang-4.0 _CXX=clang++-4.0 _DSL_CC=${_CC} _DSL_CXX=${_CXX}
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-4.0
- llvm-toolchain-xenial-4.0
packages:
- clang-4.0
env: _CC=clang-4.0 _CXX=clang++-4.0 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=14"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
- llvm-toolchain-xenial-5.0
packages:
- clang-5.0
env: _CC=clang-5.0 _CXX=clang++-5.0 _DSL_CC=${_CC} _DSL_CXX=${_CXX}
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
- llvm-toolchain-xenial-5.0
packages:
- clang-5.0
env: _CC=clang-5.0 _CXX=clang++-5.0 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=14"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-6.0
- llvm-toolchain-xenial-5.0
packages:
- clang-5.0
env: _CC=clang-5.0 _CXX=clang++-5.0 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=17"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-xenial-6.0
packages:
- clang-6.0
env: _CC=clang-6.0 _CXX=clang++-6.0 _DSL_CC=${_CC} _DSL_CXX=${_CXX}
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-6.0
- llvm-toolchain-xenial-6.0
packages:
- clang-6.0
env: _CC=clang-6.0 _CXX=clang++-6.0 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=14"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-7
- llvm-toolchain-xenial-6.0
packages:
- clang-6.0
env: _CC=clang-6.0 _CXX=clang++-6.0 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=17"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-xenial-7
packages:
- clang-7
env: _CC=clang-7 _CXX=clang++-7 _DSL_CC=${_CC} _DSL_CXX=${_CXX}
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-7
- llvm-toolchain-xenial-7
packages:
- clang-7
env: _CC=clang-7 _CXX=clang++-7 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=14"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-8
- llvm-toolchain-xenial-7
packages:
- clang-7
env: _CC=clang-7 _CXX=clang++-7 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=17"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
env: _CC=clang-8 _CXX=clang++-8 _DSL_CC=${_CC} _DSL_CXX=${_CXX}
- os: linux
addons:
apt:
sources:
- llvm-toolchain-trusty-8
- llvm-toolchain-xenial-8
packages:
- clang-8
env: _CC=clang-8 _CXX=clang++-8 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=14"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
env: _CC=clang-8 _CXX=clang++-8 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=17"
- os: linux
addons:
apt:
sources:
- llvm-toolchain-xenial-8
packages:
- clang-8
env: _CC=clang-8 _CXX=clang++-8 _DSL_CC=${_CC} _DSL_CXX=${_CXX} _BUILD="-DCMAKE_CXX_STANDARD=20"

before_install:
- if [ -n "${_USE_GCC9}" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; sudo apt-get update; sudo apt-get install g++-9; fi
- sudo apt-get install libqt5serialport5-dev -y
- sudo apt-get install libboost-program-options-dev libboost-filesystem-dev libboost-system-dev -y

Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ option (DEMO1_NO_WARN_AS_ERR "Don't treat compilation warnings as errors." OFF)
# is not provided and examples are not disabled.

if ("${COMMSDSL_TAG}" STREQUAL "")
set(COMMSDSL_TAG "v3.3.3")
set(COMMSDSL_TAG "v3.4")
endif ()

if ("${COMMS_TAG}" STREQUAL "")
set(COMMS_TAG "v2.3.3")
set(COMMS_TAG "v2.4")
endif ()

set (VERSION "0.15.3")
set (VERSION "0.16")

set (COMMSDSL_TGT "commsdsl_tgt")
if ("${COMMSDSL2COMMS}" STREQUAL "")
Expand Down
2 changes: 2 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,7 @@ find_package(Boost REQUIRED

find_package(Threads REQUIRED)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common/include)

add_subdirectory (server)
add_subdirectory (client)
12 changes: 7 additions & 5 deletions examples/client/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ namespace client
{

Client::Client(
boost::asio::io_service& io,
common::boost_wrap::io& io,
const std::string& server,
std::uint16_t port)
: m_socket(io),
: m_io(io),
m_socket(io),
m_timer(io),
m_server(server),
m_port(port)
Expand All @@ -29,7 +30,7 @@ Client::Client(

bool Client::start()
{
boost::asio::ip::tcp::resolver resolver(m_socket.get_io_service());
boost::asio::ip::tcp::resolver resolver(m_io);
auto query = boost::asio::ip::tcp::resolver::query(m_server, std::to_string(m_port));

boost::system::error_code ec;
Expand Down Expand Up @@ -83,7 +84,7 @@ void Client::readDataFromServer()

if (ec) {
std::cerr << "ERROR: Failed to read with error: " << ec.message() << std::endl;
m_socket.get_io_service().stop();
m_io.stop();
return;
}

Expand Down Expand Up @@ -140,7 +141,8 @@ void Client::readDataFromStdin()
return; // Don't read STDIN right away, wait for ACK first
} while (false);

m_socket.get_io_service().post(
common::boost_wrap::post(
m_io,
[this]()
{
readDataFromStdin();
Expand Down
Loading

0 comments on commit 700950e

Please sign in to comment.