Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Build with shared boost libraries #1067

Merged
merged 2 commits into from
Jan 24, 2019
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
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ configure_file(CTestCustom.cmake CTestCustom.cmake)

unset(AKTUALIZR_CHECKED_SRCS CACHE)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That isn't the default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property is True by default for SHARED and MODULE library targets and False otherwise.


# find all required libraries
set(Boost_USE_STATIC_LIBS ON)
set(BOOST_COMPONENTS log_setup log filesystem program_options)
set(Boost_USE_STATIC_LIBS OFF)
add_definitions(-DBOOST_LOG_DYN_LINK)

if(BUILD_OPCUA)
list(APPEND BOOST_COMPONENTS serialization iostreams)
Expand Down
6 changes: 6 additions & 0 deletions docker/Dockerfile-test-install.ubuntu.bionic
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -y install debian-archive-keyring
RUN apt-get update && apt-get install -y \
libarchive13 \
libboost-iostreams1.65.1 \
libboost-log1.65.1 \
libboost-program-options1.65.1 \
libboost-system1.65.1 \
libboost-test1.65.1 \
libboost-thread1.65.1 \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why random and regex? I thought we didn't use those anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patrickvacek I simply took it from the Dockerfile.ubuntu.bionic. If we don't use it, then it should be also deleted there, I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still use random in Utils.Base64RoundTrip test, but looks like regex could be deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The is no point in using boost::random over std::random there, so I'll try to remove it as well.

libc6 \
libcurl4 \
libglib2.0-0 \
Expand Down
6 changes: 6 additions & 0 deletions docker/Dockerfile-test-install.ubuntu.xenial
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -y install debian-archive-keyring
RUN apt-get update && apt-get install -y \
libarchive13 \
libboost-iostreams1.58.0 \
libboost-log1.58.0 \
libboost-program-options1.58.0 \
libboost-system1.58.0 \
libboost-test1.58.0 \
libboost-thread1.58.0 \
libc6 \
libcurl3 \
libglib2.0-0 \
Expand Down
2 changes: 0 additions & 2 deletions docker/Dockerfile.debian.testing
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ RUN apt-get update && apt-get -y install \
libboost-iostreams-dev \
libboost-log-dev \
libboost-program-options-dev \
libboost-random-dev \
libboost-regex-dev \
libboost-system-dev \
libboost-test-dev \
libboost-thread-dev \
Expand Down
2 changes: 0 additions & 2 deletions docker/Dockerfile.ubuntu.bionic
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ RUN apt-get update && apt-get -y install \
libboost-iostreams-dev \
libboost-log-dev \
libboost-program-options-dev \
libboost-random-dev \
libboost-regex-dev \
libboost-system-dev \
libboost-test-dev \
libboost-thread-dev \
Expand Down
2 changes: 0 additions & 2 deletions docker/Dockerfile.ubuntu.xenial
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ RUN apt-get update && apt-get -y install \
libboost-iostreams-dev \
libboost-log-dev \
libboost-program-options-dev \
libboost-random-dev \
libboost-regex-dev \
libboost-system-dev \
libboost-test-dev \
libboost-thread-dev \
Expand Down
5 changes: 2 additions & 3 deletions src/libaktualizr/utilities/utils_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include <boost/algorithm/hex.hpp>
#include <boost/archive/iterators/dataflow_exception.hpp>
#include <boost/random/uniform_smallint.hpp>

#include "utilities/utils.h"

Expand Down Expand Up @@ -122,9 +121,9 @@ TEST(Utils, FromBase64Wrong) {

TEST(Utils, Base64RoundTrip) {
std::mt19937 gen;
boost::random::uniform_smallint<char> chars(std::numeric_limits<char>::min(), std::numeric_limits<char>::max());
std::uniform_int_distribution<char> chars(std::numeric_limits<char>::min(), std::numeric_limits<char>::max());

boost::random::uniform_smallint<int> length(0, 20);
std::uniform_int_distribution<int> length(0, 20);

for (int test = 0; test < 100; test++) {
int len = length(gen);
Expand Down