Commit 36de4412 authored by Philipp Götze's avatar Philipp Götze
Browse files

Merge branch 'master' into wip/mvcc

parents 78f5c547 8a7e6ff7
Pipeline #158 failed with stages
in 33 minutes and 42 seconds
image: "dbisilm/pfabric:alpine"
stages:
- build
- test
build:
stage: build
tags:
- grouprunner
script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ../src
- make
# clean up unnecessary files and strip binaries
- rm -rf *-src *-download *-build 3rdparty
- strip test/*Test
artifacts:
paths:
- build/
expire_in: 30 minutes
test:
stage: test
tags:
- grouprunner
script:
- cd build
- ctest
dependencies:
- build
coverage:
stage: build
tags:
- grouprunner
script:
- echo pfpass | sudo -S apk add py-pip
- pip install gcovr --user
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-g -O0 -fprofile-arcs -ftest-coverage" ../src
- make
- ctest
- ~/.local/bin/gcovr -r .. --exclude 3rdparty --exclude '(.+/)?catch\.hpp$'
coverage: '/^TOTAL.*\s+(\d+\%)$/'
# Based on cxxdev by Dan Liew <daniel.liew@imperial.ac.uk>
FROM ubuntu:14.04
FROM alpine:latest
MAINTAINER Kai-Uwe Sattler <kus@tu-ilmenau.de>
ENV CONTAINER_USER="pf"
RUN apt-get update && apt-get -y upgrade && apt-get -y install wget
RUN apt-get -y --no-install-recommends install \
aptitude \
software-properties-common \
python-software-properties \
bash-completion \
build-essential \
coreutils \
git-core \
htop \
mercurial \
ncdu \
ninja-build \
python \
python-dev \
python-pip \
subversion \
tmux \
tree \
unzip \
vim
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update
RUN apt-get -y install gcc-5 g++-5
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1 --slave /usr/bin/g++ g++ /usr/bin/g++-5
# Download and install ZeroMQ
RUN wget https://github.com/zeromq/zeromq4-1/releases/download/v4.1.5/zeromq-4.1.5.tar.gz; \
tar xvzof zeromq-4.1.5.tar.gz && rm zeromq-4.1.5.tar.gz
RUN cd zeromq-4.1.5 && ./configure && make install
RUN wget https://raw.githubusercontent.com/zeromq/cppzmq/master/zmq.hpp && mv zmq.hpp /usr/local/include
# Download and install a more recent version of CMake
RUN wget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz ; \
tar xvzof cmake-3.6.2.tar.gz && rm cmake-3.6.2.tar.gz
RUN cd cmake-3.6.2 && ./configure && make && make install
# Download and install the most recent version of the Boost libraries
RUN wget https://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz; \
tar xvzof boost_1_63_0.tar.gz; \
rm boost_1_63_0.tar.gz;
RUN cd boost_1_63_0 && ./bootstrap.sh --prefix=/usr/local/boost && mkdir /usr/local/boost && ./b2 install
# Cleanup
RUN rm -fr /boost_1_63_0 zeromq-4.1.5 cmake-3.6.2
# Add non-root user for container but give it sudo access.
# Password is the same as the username
RUN useradd -m ${CONTAINER_USER} && \
echo ${CONTAINER_USER}:${CONTAINER_USER} | chpasswd && \
cp /etc/sudoers /etc/sudoers.bak && \
echo "${CONTAINER_USER} ALL=(root) ALL" >> /etc/sudoers
# Make bash the default shell (useful for when using tmux in the container)
RUN chsh --shell /bin/bash ${CONTAINER_USER}
USER ${CONTAINER_USER}
# Download an build PipeFabric
RUN cd /home/${CONTAINER_USER} && \
git clone http://dbgit.prakinf.tu-ilmenau.de/code/pfabric.git && \
cd pfabric && mkdir build && cd build && \
export BOOST_ROOT=/usr/local/boost; \
cmake ../src
# RUN cd /home/${CONTAINER_USER}/pfabric/build && make VERBOSE=1 && make test
# Installing dependencies
RUN apk update && apk add --no-cache \
cmake \
git \
g++ \
boost-dev \
zeromq-dev \
make \
sudo && \
wget -P /usr/include/ https://raw.githubusercontent.com/zeromq/cppzmq/master/zmq.hpp && \
# Cleaning up
rm -rf /usr/share/doc && \
rm -rf /usr/share/man/?? && \
rm -rf /usr/share/man/??_*
# Add user and allow sudo
ENV USER pf
ENV USERPASS pfpass
RUN adduser -S $USER && \
echo "$USER:$USERPASS" | chpasswd && \
echo "${USER} ALL=(root) ALL" >> /etc/sudoers
USER $USER
WORKDIR /home/$USER
# Download and build PipeFabric
RUN git config --global http.sslverify false && \
git clone https://dbgit.prakinf.tu-ilmenau.de/code/pfabric.git && \
cd pfabric && mkdir build && cd build && \
cmake ../src
# This costs too much space for the image
# make VERBOSE=1 && make test
### PipeFabric ###
PipeFabric
==========
[![pipeline status](https://dbgit.prakinf.tu-ilmenau.de/code/pfabric/badges/master/pipeline.svg)](https://dbgit.prakinf.tu-ilmenau.de/code/pfabric/commits/master)
[![coverage report](https://dbgit.prakinf.tu-ilmenau.de/code/pfabric/badges/master/coverage.svg?job=coverage)](https://dbgit.prakinf.tu-ilmenau.de/code/pfabric/commits/master)
PipeFabric is a C++ framework for processing streams of tuples where the
processing steps are described by queries formulated as dataflow graphs of
......
......@@ -9,6 +9,7 @@ set(THIRD_PARTY_DIR "${PROJECT_BINARY_DIR}/3rdparty")
download_project(PROJ Catch
GIT_REPOSITORY https://github.com/philsquared/Catch
GIT_TAG master
GIT_SHALLOW 1
UPDATE_DISCONNECTED 1
QUIET
)
......@@ -20,17 +21,27 @@ add_custom_command(
#--------------------------------------------------------------------------------
# the JSON library
download_project(PROJ json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG develop
UPDATE_DISCONNECTED 1
QUIET
# this repository is too big (~500MB)
#download_project(PROJ json
# GIT_REPOSITORY https://github.com/nlohmann/json.git
# GIT_TAG develop
# GIT_SHALLOW 1
# UPDATE_DISCONNECTED 1
# QUIET
#)
download_project(PROJ json
URL https://raw.githubusercontent.com/nlohmann/json/v3.7.0/single_include/nlohmann/json.hpp
DOWNLOAD_NO_EXTRACT 1
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
QUIET
)
add_custom_command(
OUTPUT ${THIRD_PARTY_DIR}/json
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/json
COMMAND ${CMAKE_COMMAND} -E copy
${json_SOURCE_DIR}/single_include/nlohmann/json.hpp
${json_SOURCE_DIR}/../json-download/json-download-prefix/src/json.hpp
${THIRD_PARTY_DIR}/json/)
include_directories("${THIRD_PARTY_DIR}/json")
......@@ -39,7 +50,8 @@ include_directories("${THIRD_PARTY_DIR}/json")
# the format library
download_project(PROJ Format
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 4.1.0
GIT_TAG 5.3.0
GIT_SHALLOW 1
UPDATE_DISCONNECTED 1
QUIET
)
......@@ -47,11 +59,10 @@ add_custom_command(
OUTPUT ${THIRD_PARTY_DIR}/fmt
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/fmt
COMMAND ${CMAKE_COMMAND} -E copy
${Format_SOURCE_DIR}/fmt/format.*
${THIRD_PARTY_DIR}/fmt
COMMAND ${CMAKE_COMMAND} -E copy
${Format_SOURCE_DIR}/fmt/ostream.*
${THIRD_PARTY_DIR}/fmt)
${Format_SOURCE_DIR}/include/fmt/core.h
${Format_SOURCE_DIR}/include/fmt/format-inl.h
${Format_SOURCE_DIR}/include/fmt/format.h
${THIRD_PARTY_DIR}/fmt/)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFMT_HEADER_ONLY=1")
include_directories("${THIRD_PARTY_DIR}/fmt")
......@@ -61,6 +72,7 @@ include_directories("${THIRD_PARTY_DIR}/fmt")
download_project(PROJ SimpleWeb
GIT_REPOSITORY https://github.com/eidheim/Simple-Web-Server.git
GIT_TAG master
GIT_SHALLOW 1
UPDATE_DISCONNECTED 1
QUIET
)
......@@ -76,22 +88,23 @@ add_custom_command(
if (BUILD_GOOGLE_BENCH)
download_project(PROJ benchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
GIT_TAG v1.2.0
GIT_TAG v1.5.0
GIT_SHALLOW 1
UPDATE_DISCONNECTED 1
QUIET
)
add_custom_command(
OUTPUT ${THIRD_PARTY_DIR}/benchmark
COMMAND ${CMAKE_COMMAND} -E chdir ${benchmark_SOURCE_DIR} cmake -DCMAKE_BUILD_TYPE=Release
COMMAND ${CMAKE_COMMAND} -E chdir ${benchmark_SOURCE_DIR} $(MAKE)
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/benchmark/include
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/benchmark/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory
${benchmark_SOURCE_DIR}/include
${THIRD_PARTY_DIR}/benchmark/include
COMMAND ${CMAKE_COMMAND} -E copy
${benchmark_SOURCE_DIR}/src/libbenchmark.a
${THIRD_PARTY_DIR}/benchmark/lib
OUTPUT ${THIRD_PARTY_DIR}/benchmark
COMMAND ${CMAKE_COMMAND} -E chdir ${benchmark_SOURCE_DIR} cmake -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_ENABLE_TESTING=OFF, -DBENCHMARK_ENABLE_GTEST_TESTS=OFF
COMMAND ${CMAKE_COMMAND} -E chdir ${benchmark_SOURCE_DIR} $(MAKE)
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/benchmark/include
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/benchmark/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory
${benchmark_SOURCE_DIR}/include
${THIRD_PARTY_DIR}/benchmark/include
COMMAND ${CMAKE_COMMAND} -E copy
${benchmark_SOURCE_DIR}/src/libbenchmark.a
${THIRD_PARTY_DIR}/benchmark/lib
)
endif()
......@@ -99,37 +112,68 @@ endif()
if(USE_ROCKSDB_TABLE)
# RocksDB key-value store
download_project(PROJ rocksdb
GIT_REPOSITORY https://github.com/facebook/rocksdb
GIT_TAG v6.2.2
UPDATE_DISCONNECTED 1
QUIET
GIT_REPOSITORY https://github.com/facebook/rocksdb
GIT_TAG v6.2.2
GIT_SHALLOW 1
UPDATE_DISCONNECTED 1
QUIET
)
add_custom_command(
OUTPUT ${THIRD_PARTY_DIR}/rocksdb
COMMAND ${CMAKE_COMMAND} -E chdir ${rocksdb_SOURCE_DIR} $(MAKE) static_lib
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/rocksdb/include
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/rocksdb/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory
${rocksdb_SOURCE_DIR}/include
${THIRD_PARTY_DIR}/rocksdb/include
COMMAND ${CMAKE_COMMAND} -E copy
${rocksdb_SOURCE_DIR}/librocksdb.a
${THIRD_PARTY_DIR}/rocksdb/lib
OUTPUT ${THIRD_PARTY_DIR}/rocksdb
COMMAND ${CMAKE_COMMAND} -E chdir ${rocksdb_SOURCE_DIR} $(MAKE) static_lib
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/rocksdb/include
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/rocksdb/lib
COMMAND ${CMAKE_COMMAND} -E copy_directory
${rocksdb_SOURCE_DIR}/include
${THIRD_PARTY_DIR}/rocksdb/include
COMMAND ${CMAKE_COMMAND} -E copy
${rocksdb_SOURCE_DIR}/librocksdb.a
${THIRD_PARTY_DIR}/rocksdb/lib
)
endif()
#--------------------------------------------------------------------------------
if(BUILD_USE_CASES)
# data for use cases
download_project(PROJ data
GIT_REPOSITORY https://github.com/dbis-ilm/data.git
GIT_TAG master
UPDATE_DISCONNECTED 1
QUIET
download_project(PROJ data
GIT_REPOSITORY https://github.com/dbis-ilm/data.git
GIT_TAG master
GIT_SHALLOW 1
UPDATE_DISCONNECTED 1
QUIET
)
file(COPY ${PROJECT_BINARY_DIR}/data-src/DEBS2017
DESTINATION ${THIRD_PARTY_DIR}
)
# Linear Road Data Driver
download_project(PROJ linroad
GIT_REPOSITORY https://github.com/samsonxian/Linear-Road-Benchmark-Data-Driver.git
GIT_TAG master
GIT_SHALLOW 1
UPDATE_DISCONNECTED 1
QUIET
)
add_custom_command(
OUTPUT ${THIRD_PARTY_DIR}/linroad
COMMAND ${CMAKE_COMMAND} -E copy
${PROJECT_SOURCE_DIR}/usecases/LinearRoad/CMakeLists.txt
${linroad_SOURCE_DIR}/src
COMMAND ${CMAKE_COMMAND} -E chdir ${linroad_SOURCE_DIR}/src cmake .
COMMAND ${CMAKE_COMMAND} -E chdir ${linroad_SOURCE_DIR}/src $(MAKE)
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/linroad/data
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/linroad/include
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/linroad/lib
COMMAND ${CMAKE_COMMAND} -E copy
${linroad_SOURCE_DIR}/src/Data/datafile20seconds.dat
${THIRD_PARTY_DIR}/linroad/data
COMMAND ${CMAKE_COMMAND} -E copy
${linroad_SOURCE_DIR}/src/libLRDataProvider.a
${THIRD_PARTY_DIR}/linroad/lib
COMMAND ${CMAKE_COMMAND} -E copy
${linroad_SOURCE_DIR}/src/LRDataProvider.h
${THIRD_PARTY_DIR}/linroad/include
)
endif()
#--------------------------------------------------------------------------------
......@@ -138,6 +182,7 @@ if(USE_NVM_TABLE)
download_project(PROJ pmdk
GIT_REPOSITORY https://github.com/pmem/pmdk.git
GIT_TAG master
GIT_SHALLOW 1
UPDATE_DISCONNECTED 1
QUIET
)
......@@ -147,17 +192,32 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E chdir ${pmdk_SOURCE_DIR} $(MAKE) install prefix=${THIRD_PARTY_DIR}/pmdk
)
# PTable (internal gitlab project) for NVM
download_project(PROJ ptable
GIT_REPOSITORY https://dbgit.prakinf.tu-ilmenau.de/code/PTable.git
download_project(PROJ pmdk-cpp
GIT_REPOSITORY https://github.com/pmem/libpmemobj-cpp
GIT_TAG master
GIT_SHALLOW 1
UPDATE_DISCONNECTED 1
QUIET
)
add_custom_command(
OUTPUT ${THIRD_PARTY_DIR}/pmdk-cpp
COMMAND ${CMAKE_COMMAND} -E copy_directory
${pmdk-cpp_SOURCE_DIR}/include
${THIRD_PARTY_DIR}/pmdk/include
)
# PTable (part of nvm-based data structures) for NVM
download_project(PROJ nvmDS
GIT_REPOSITORY https://dbgit.prakinf.tu-ilmenau.de/code/nvm-based_data_structures.git
GIT_TAG master
GIT_SHALLOW 1
UPDATE_DISCONNECTED 1
QUIET
)
add_custom_command(
OUTPUT ${THIRD_PARTY_DIR}/ptable
COMMAND ${CMAKE_COMMAND} -E chdir ${ptable_SOURCE_DIR} cmake -DPTABLE_DIR=${THIRD_PARTY_DIR}/ptable src
COMMAND ${CMAKE_COMMAND} -E chdir ${ptable_SOURCE_DIR} $(MAKE) install
OUTPUT ${THIRD_PARTY_DIR}/nvmDS
COMMAND ${CMAKE_COMMAND} -E chdir ${nvmDS_SOURCE_DIR} cmake -DBUILD_TEST_CASES=OFF -DPROJECT_INSTALL_DIR=${THIRD_PARTY_DIR}/nvmDS src
COMMAND ${CMAKE_COMMAND} -E chdir ${nvmDS_SOURCE_DIR} $(MAKE) install
)
endif()
......@@ -173,7 +233,7 @@ add_custom_command(
OUTPUT ${THIRD_PARTY_DIR}/libcuckoo
COMMAND ${CMAKE_COMMAND} -E make_directory ${THIRD_PARTY_DIR}/libcuckoo
COMMAND ${CMAKE_COMMAND} -E chdir ${libcuckoo_SOURCE_DIR} cmake -DBUILD_EXAMPLES=0 -DBUILD_TESTS=0
COMMAND ${CMAKE_COMMAND} -E chdir ${libcuckoo_SOURCE_DIR} $(MAKE) all
COMMAND ${CMAKE_COMMAND} -E chdir ${libcuckoo_SOURCE_DIR} $(MAKE) all
COMMAND ${CMAKE_COMMAND} -E copy
${libcuckoo_SOURCE_DIR}/libcuckoo/*.hh
${THIRD_PARTY_DIR}/libcuckoo/)
### Installation ###
First of all, you need a very recent C++ compiler supporting the C++14 standard.
First of all, you need a very recent C++ compiler supporting the C++17 standard (e.g., gcc-7.1 upwards).
PipeFabric relies on several open source components which have to be installed before:
+ [CMake](https://cmake.org/) 3.0 (or newer) build environment
+ [CMake](https://cmake.org/) 3.2 (or newer) build environment
+ [Boost](http://www.boost.org/) 1.61 (or newer) C++ libraries (build all libraries)
+ [ZeroMQ](http://zeromq.org/) socket library (including [zmq.hpp](https://github.com/zeromq/cppzmq/blob/master/zmq.hpp))
+ JeMalloc or TCMalloc library (optional)
......
......@@ -22,11 +22,11 @@ option(USE_RABBITMQ "use RabbitMQ as network source"
option(USE_KAFKA "use Apache Kafka as network source" OFF)
option(USE_MQTT "use MQTT as network source" OFF)
option(USE_BOOST_SPIRIT_PARSER "use the boost::spirit::qi parsers (strings convertion)" ON )
option(USE_ROCKSDB_TABLE "use RocksDB for implementing persistent tables" ON)
option(USE_ROCKSDB_TABLE "use RocksDB for implementing persistent tables" OFF)
option(USE_NVM_TABLE "use NVM for implementing persistent memory tables" OFF)
option(BUILD_ONLY_LIBS "build only the two pipefabric libraries" ON )
option(BUILD_TEST_CASES "build tests for pipefabric functionality" OFF)
option(BUILD_GOOGLE_BENCH "build google benchmark" ON )
option(BUILD_GOOGLE_BENCH "build google benchmark" OFF)
option(BUILD_BENCHMARKS "build benchmark test for pipefabric" OFF)
option(BUILD_PYTHON "build python interface for pipefabric" OFF)
......@@ -36,11 +36,6 @@ option(BUILD_PYTHON "build python interface for pipefabric"
############################################################################################
#
# Use cases require matrix support (image and graph processing)
if(BUILD_USE_CASES)
set(SUPPORT_MATRICES OFF)
endif()
# Benchmark test requires benchmark library
if (BUILD_BENCHMARKS)
set(BUILD_GOOGLE_BENCH ON)
......@@ -52,7 +47,7 @@ endif()
#CMAKE_FORCE_CXX_COMPILER(icpc "Intel C++ Compiler")
# C++ compiler flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wno-deprecated -g -O3 -Wsign-compare")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated -Wsign-compare")
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs -Wno-#pragma-messages")
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
......@@ -62,6 +57,15 @@ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused -Wno-uninitialized")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS_DEBUG -g)
set(CMAKE_CXX_FLAGS_RELEASE -O3)
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
endif()
# Add our CMake directory to CMake's module path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/")
......@@ -81,6 +85,7 @@ endif()
include_directories("${THIRD_PARTY_DIR}")
set(core_sources
${core_sources}
# we need this as dependency to download the sources from github
${THIRD_PARTY_DIR}/json
${THIRD_PARTY_DIR}/fmt
......@@ -90,6 +95,29 @@ set(core_sources
)
set(core_libs "")
if(BUILD_USE_CASES)
add_definitions(-DBUILD_USE_CASES)
# Use case for linear road
include_directories("${THIRD_PARTY_DIR}/linroad/include")
set(LINROAD_LIB "${THIRD_PARTY_DIR}/linroad/lib/libLRDataProvider.a")
file(COPY ${PROJECT_SOURCE_DIR}/usecases/LinearRoad/LinearRoadTest.cpp
DESTINATION ${PROJECT_SOURCE_DIR}/test
)
set(core_sources
${core_sources}
${THIRD_PARTY_DIR}/linroad
)
set(core_libs
${core_libs}
${LINROAD_LIB}
)
if(SUPPORT_MATRICES)
# Use cases require matrix support (image and graph processing)
set(SUPPORT_MATRICES ON)
endif()
endif()
############################################################################################
# Memory allocator libraries #
......@@ -172,21 +200,23 @@ if (USE_NVM_TABLE)
"${THIRD_PARTY_DIR}/pmdk/lib/libpmempool.a"
"${THIRD_PARTY_DIR}/pmdk/lib/libpmem.a"
${DYLIB_LIBRARY}
"${THIRD_PARTY_DIR}/ptable/lib/libptable.so"
"${THIRD_PARTY_DIR}/nvmDS/lib/libptable.so"
)
include_directories(
"${THIRD_PARTY_DIR}/pmdk/include"
"${THIRD_PARTY_DIR}/ptable/include"
"${THIRD_PARTY_DIR}/nvmDS/include"
)
add_definitions(-DDO_LOG=0)
set(core_sources
${core_sources}
${THIRD_PARTY_DIR}/pmdk
${THIRD_PARTY_DIR}/ptable
${THIRD_PARTY_DIR}/pmdk-cpp
${THIRD_PARTY_DIR}/nvmDS
)
set(core_libs
${core_libs}
${PMDK_LIBRARIES}
ndctl
daxctl
)
else ()
message(STATUS "don't use NVM based persistent table")
......@@ -429,15 +459,17 @@ target_link_libraries(pfabric_core
############################################################################################
#
add_library(pfabric_cep SHARED
cep/Matcher.cpp
# we need this as dependency to download the sources from github
${THIRD_PARTY_DIR}/fmt
)
if(NOT BUILD_ONLY_LIB)
add_library(pfabric_cep SHARED
cep/Matcher.cpp
# we need this as dependency to download the sources from github
${THIRD_PARTY_DIR}/fmt
)
target_link_libraries(pfabric_cep
${BOOST_LIBRARIES}
)
target_link_libraries(pfabric_cep
${BOOST_LIBRARIES}
)
endif()
############################################################################################
......@@ -467,23 +499,25 @@ endif()
############################################################################################
#
add_library(pfabric_qcomp SHARED
qcomp/Plan.cpp
qcomp/PlanCache.cpp
qcomp/QueryCompiler.cpp
qcomp/TypeManager.cpp
qcomp/UniqueNameGenerator.cpp
qcomp/SQLParser.cpp
)
if(BUILD_USE_CASES OR NOT BUILD_ONLY_LIB)
add_library(pfabric_qcomp SHARED
qcomp/Plan.cpp
qcomp/PlanCache.cpp
qcomp/QueryCompiler.cpp
qcomp/TypeManager.cpp
qcomp/UniqueNameGenerator.cpp
qcomp/SQLParser.cpp
)
target_link_libraries(pfabric_qcomp
pfabric_core
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${BOOST_LIBRARIES}
)
target_link_libraries(pfabric_qcomp
pfabric_core
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${BOOST_LIBRARIES}
)
add_subdirectory(qcomp)
add_subdirectory(qcomp)
endif()
############################################################################################
......@@ -491,7 +525,9 @@ add_subdirectory(qcomp)
############################################################################################
#
add_subdirectory(demo)
if(NOT BUILD_ONLY_LIB)
add_subdirectory(demo)
endif()
############################################################################################
......@@ -513,6 +549,8 @@ add_subdirectory(test)
if(BUILD_USE_CASES)
add_subdirectory(usecases)
add_executable(LinRoad usecases/LinearRoad/LinRoad.cpp)
target_link_libraries(LinRoad pfabric_core)
endif()
......@@ -524,7 +562,11 @@ endif()
# Installation path
set(PIPEFABRIC_DIR "/usr/local/pfabric")
set(PIPEFABRIC_LIBS pfabric_core pfabric_cep)
if(BUILD_ONLY_LIB)
set(PIPEFABRIC_LIBS pfabric_core)
else()
set(PIPEFABRIC_LIBS pfabric_core pfabric_cep)