Skip to content

Commit

Permalink
Merge pull request #22 from muflihun/develop
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
abumq authored Feb 11, 2018
2 parents 53e1207 + a7c9ae2 commit ffadbf6
Show file tree
Hide file tree
Showing 423 changed files with 94,987 additions and 101 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ matrix:
before_install:
- sudo add-apt-repository ppa:kubuntu-ppa/backports -y
- sudo apt-get -qq update
- sudo apt-get install -y libboost-system-dev libgtest-dev
- sudo apt-get install -y libgtest-dev
- sudo apt-get install --only-upgrade cmake
- g++ -v

Expand All @@ -24,7 +24,7 @@ matrix:
- CXX=$COMPILER
- sudo add-apt-repository ppa:kubuntu-ppa/backports -y
- sudo apt-get -qq update
- sudo apt-get install -y libboost-system-dev libgtest-dev
- sudo apt-get install -y libgtest-dev
- sudo apt-get install --only-upgrade cmake

- os: linux
Expand All @@ -39,7 +39,7 @@ matrix:
- CXX=$COMPILER
- sudo add-apt-repository ppa:kubuntu-ppa/backports -y
- sudo apt-get -qq update
- sudo apt-get install -y libboost-system-dev libgtest-dev
- sudo apt-get install -y libgtest-dev
- sudo apt-get install --only-upgrade cmake

- os: linux
Expand All @@ -54,7 +54,7 @@ matrix:
- CXX=$COMPILER
- sudo add-apt-repository ppa:kubuntu-ppa/backports -y
- sudo apt-get -qq update
- sudo apt-get install -y libboost-system-dev libgtest-dev
- sudo apt-get install -y libgtest-dev
- sudo apt-get install --only-upgrade cmake

- os: linux
Expand All @@ -69,13 +69,12 @@ matrix:
- CXX=$COMPILER
- sudo add-apt-repository ppa:kubuntu-ppa/backports -y
- sudo apt-get -qq update
- sudo apt-get install -y libboost-system-dev libgtest-dev
- sudo apt-get install -y libgtest-dev
- sudo apt-get install --only-upgrade cmake

# - os: osx
# compiler: clang
# osx_image: xcode8
# - sudo port install boost
# - g++ -v
# - cmake -v

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [1.1.0]
### Updates
- Removed dependency on linked boost
- Include easylogging++ with packages to avoid conflicts
- Residue headers are now installed in `residue/` directory since it contains it's own version of Easylogging++

## [1.0.2]
### Updates
- License information update
Expand Down
40 changes: 11 additions & 29 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ option (BUILD_SHARED_LIBS "build shared libraries" ON)
option (special_edition "Special edition build" OFF)

set (RESIDUE_MAJOR "1")
set (RESIDUE_MINOR "0")
set (RESIDUE_PATCH "2")
set (RESIDUE_MINOR "1")
set (RESIDUE_PATCH "0")

set (RESIDUE_SOVERSION "${RESIDUE_MAJOR}.${RESIDUE_MINOR}.${RESIDUE_PATCH}")
set (RESIDUE_NAME "Residue-C++")
Expand All @@ -30,24 +30,14 @@ if (special_edition)
add_definitions (-DRESIDUE_SPECIAL_EDITION)
endif()

add_definitions (-DASIO_STANDALONE)

include (FindPackageHandleStandardArgs)

#require_cpp11()
check_apple()

list (APPEND CMAKE_CXX_FLAGS " -std=c++11 -O3 -Wall -Werror -Wno-unknown-warning-option -Wno-pessimizing-move ")

if (travis)
message ("-- Building on travis")
set (static_boost OFF)
else()
set (static_boost ON)
endif()
set (static_boost OFF)

message ("-- Check for Easylogging++")
find_package (EASYLOGGINGPP REQUIRED)
include_directories (${EASYLOGGINGPP_INCLUDE_DIR})
list (APPEND CMAKE_CXX_FLAGS " -std=c++11 -O3 -Wall -Wno-unknown-warning-option -Wno-pessimizing-move ")

find_package(ZLIB REQUIRED)
if (ZLIB_FOUND)
Expand All @@ -57,15 +47,7 @@ else()
message ("--==> libz not found")
endif(ZLIB_FOUND)

message ("-- Check for Boost System (dynamic)")
## We always use static linking for boost stuffs
## Note this does not work when residue library is being build statically
set (Boost_USE_STATIC_LIBS ${static_boost})
unset(Boost_INCLUDE_DIR CACHE)
unset(Boost_LIBRARY_DIRS CACHE)
find_package (Boost REQUIRED COMPONENTS system)
include_directories (${Boost_INCLUDE_DIR})
message ("-- Boost binary: " ${Boost_LIBRARIES})
include_directories(${CMAKE_SOURCE_DIR}/deps)

# Check for cryptopp (static)
set(CryptoPP_USE_STATIC_LIBS ON)
Expand All @@ -76,17 +58,16 @@ include_directories (${CRYPTOPP_INCLUDE_DIRS})
thread_packages_check()

set (THIRD_PARTY_REQUIRED_LIBS
${Boost_LIBRARIES}
${ZLIB_LIBRARIES}
${CRYPTOPP_LIBRARIES}
)

############# RESIDUE (STATIC) CLIENT LIB ###############

set(LIB_RESIDUE_SOURCE_FILES
include/Ripe.cc
deps/ripe/Ripe.cc
src/Residue.cc
${EASYLOGGINGPP_INCLUDE_DIR}/easylogging++.cc
src/easylogging++.cc
)


Expand Down Expand Up @@ -146,7 +127,8 @@ endif()

############# INCLUDES ###############

install (FILES include/Residue.h DESTINATION "include")
install (FILES include/Residue.h DESTINATION "include/residue/")
install (FILES include/easylogging++.h DESTINATION "include/residue/")


############# SAMPLE CLIENT APP ###############
Expand Down Expand Up @@ -189,7 +171,7 @@ if (test)

add_executable (residue-cpp-unit-tests
test/main.cc
${EASYLOGGINGPP_INCLUDE_DIR}/easylogging++.cc
src/easylogging++.cc
)

target_compile_definitions (residue-cpp-unit-tests PUBLIC
Expand Down
33 changes: 13 additions & 20 deletions cmake/FindResidue.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,34 +40,27 @@ if (Residue_USE_STATIC_LIBS)
NAMES libresidue-static-full.a libresidue-static.a libresidue.a
HINTS "${CMAKE_PREFIX_PATH}/lib"
)
find_package(ZLIB REQUIRED)
if (ZLIB_FOUND)
message ("-- Residue: libz: " ${ZLIB_LIBRARIES} " version: " ${ZLIB_VERSION_STRING})
set (RESIDUE_EXTRA_LIBRARIES ${ZLIB_LIBRARIES})
set (RESIDUE_EXTRA_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
else()
message ("Residue: zlib not found which is required with static linking")
endif(ZLIB_FOUND)
## pthreads required by boost static objects
find_package(Threads REQUIRED)
set (RESIDUE_EXTRA_LIBRARIES ${RESIDUE_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
else()
message ("-- Residue: Dynamic linking")
find_library(RESIDUE_LIBRARY_LOCAL
NAMES libresidue.dylib libresidue.so libresidue residue
HINTS "${CMAKE_PREFIX_PATH}/lib"
)
set (Boost_USE_STATIC_LIBS ON)
find_package (Boost REQUIRED COMPONENTS system)
if (Boost_FOUND)
message ("-- Residue: libboost: " ${Boost_LIBRARIES})
set (RESIDUE_EXTRA_LIBRARIES ${Boost_LIBRARIES})
set (RESIDUE_EXTRA_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
else()
message ("Residue: boost-system not found which is required with dynamic linking")
endif(Boost_FOUND)
endif()

find_package(ZLIB REQUIRED)
if (ZLIB_FOUND)
message ("-- Residue: libz: " ${ZLIB_LIBRARIES} " version: " ${ZLIB_VERSION_STRING})
set (RESIDUE_EXTRA_LIBRARIES ${ZLIB_LIBRARIES})
set (RESIDUE_EXTRA_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
else()
message ("Residue: zlib not found which is required with static linking")
endif(ZLIB_FOUND)

## pthreads required by async networking
find_package(Threads REQUIRED)
set (RESIDUE_EXTRA_LIBRARIES ${RESIDUE_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

set (RESIDUE_INCLUDE_DIR
${RESIDUE_EXTRA_INCLUDE_DIRS}
${EASYLOGGINGPP_INCLUDE_DIR}
Expand Down
122 changes: 122 additions & 0 deletions deps/asio.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
//
// asio.hpp
// ~~~~~~~~
//
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// 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 ASIO_HPP
#define ASIO_HPP

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include "asio/async_result.hpp"
#include "asio/basic_datagram_socket.hpp"
#include "asio/basic_deadline_timer.hpp"
#include "asio/basic_io_object.hpp"
#include "asio/basic_raw_socket.hpp"
#include "asio/basic_seq_packet_socket.hpp"
#include "asio/basic_serial_port.hpp"
#include "asio/basic_signal_set.hpp"
#include "asio/basic_socket_acceptor.hpp"
#include "asio/basic_socket_iostream.hpp"
#include "asio/basic_socket_streambuf.hpp"
#include "asio/basic_stream_socket.hpp"
#include "asio/basic_streambuf.hpp"
#include "asio/basic_waitable_timer.hpp"
#include "asio/buffer.hpp"
#include "asio/buffered_read_stream_fwd.hpp"
#include "asio/buffered_read_stream.hpp"
#include "asio/buffered_stream_fwd.hpp"
#include "asio/buffered_stream.hpp"
#include "asio/buffered_write_stream_fwd.hpp"
#include "asio/buffered_write_stream.hpp"
#include "asio/buffers_iterator.hpp"
#include "asio/completion_condition.hpp"
#include "asio/connect.hpp"
#include "asio/coroutine.hpp"
#include "asio/datagram_socket_service.hpp"
#include "asio/deadline_timer_service.hpp"
#include "asio/deadline_timer.hpp"
#include "asio/error.hpp"
#include "asio/error_code.hpp"
#include "asio/generic/basic_endpoint.hpp"
#include "asio/generic/datagram_protocol.hpp"
#include "asio/generic/raw_protocol.hpp"
#include "asio/generic/seq_packet_protocol.hpp"
#include "asio/generic/stream_protocol.hpp"
#include "asio/handler_alloc_hook.hpp"
#include "asio/handler_continuation_hook.hpp"
#include "asio/handler_invoke_hook.hpp"
#include "asio/handler_type.hpp"
#include "asio/io_service.hpp"
#include "asio/ip/address.hpp"
#include "asio/ip/address_v4.hpp"
#include "asio/ip/address_v6.hpp"
#include "asio/ip/basic_endpoint.hpp"
#include "asio/ip/basic_resolver.hpp"
#include "asio/ip/basic_resolver_entry.hpp"
#include "asio/ip/basic_resolver_iterator.hpp"
#include "asio/ip/basic_resolver_query.hpp"
#include "asio/ip/host_name.hpp"
#include "asio/ip/icmp.hpp"
#include "asio/ip/multicast.hpp"
#include "asio/ip/resolver_query_base.hpp"
#include "asio/ip/resolver_service.hpp"
#include "asio/ip/tcp.hpp"
#include "asio/ip/udp.hpp"
#include "asio/ip/unicast.hpp"
#include "asio/ip/v6_only.hpp"
#include "asio/is_read_buffered.hpp"
#include "asio/is_write_buffered.hpp"
#include "asio/local/basic_endpoint.hpp"
#include "asio/local/connect_pair.hpp"
#include "asio/local/datagram_protocol.hpp"
#include "asio/local/stream_protocol.hpp"
#include "asio/placeholders.hpp"
#include "asio/posix/basic_descriptor.hpp"
#include "asio/posix/basic_stream_descriptor.hpp"
#include "asio/posix/descriptor_base.hpp"
#include "asio/posix/stream_descriptor.hpp"
#include "asio/posix/stream_descriptor_service.hpp"
#include "asio/raw_socket_service.hpp"
#include "asio/read.hpp"
#include "asio/read_at.hpp"
#include "asio/read_until.hpp"
#include "asio/seq_packet_socket_service.hpp"
#include "asio/serial_port.hpp"
#include "asio/serial_port_base.hpp"
#include "asio/serial_port_service.hpp"
#include "asio/signal_set.hpp"
#include "asio/signal_set_service.hpp"
#include "asio/socket_acceptor_service.hpp"
#include "asio/socket_base.hpp"
#include "asio/strand.hpp"
#include "asio/stream_socket_service.hpp"
#include "asio/streambuf.hpp"
#include "asio/system_error.hpp"
#include "asio/thread.hpp"
#include "asio/time_traits.hpp"
#include "asio/version.hpp"
#include "asio/wait_traits.hpp"
#include "asio/waitable_timer_service.hpp"
#include "asio/windows/basic_handle.hpp"
#include "asio/windows/basic_object_handle.hpp"
#include "asio/windows/basic_random_access_handle.hpp"
#include "asio/windows/basic_stream_handle.hpp"
#include "asio/windows/object_handle.hpp"
#include "asio/windows/object_handle_service.hpp"
#include "asio/windows/overlapped_ptr.hpp"
#include "asio/windows/random_access_handle.hpp"
#include "asio/windows/random_access_handle_service.hpp"
#include "asio/windows/stream_handle.hpp"
#include "asio/windows/stream_handle_service.hpp"
#include "asio/write.hpp"
#include "asio/write_at.hpp"

#endif // ASIO_HPP
Loading

0 comments on commit ffadbf6

Please sign in to comment.