Skip to content

Commit

Permalink
Merge tag 'v2.8.8' into develop
Browse files Browse the repository at this point in the history
Upgrade python and pybind11 versions; Upgrade scarab and adapt build
  • Loading branch information
Noah Oblath committed Jan 29, 2024
2 parents 880c4a9 + dbb1b8a commit c781818
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
18 changes: 14 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cmake_minimum_required (VERSION 3.12)
#########

cmake_policy( SET CMP0048 NEW ) # version in project()
project( Dripline VERSION 2.8.7 )
project( Dripline VERSION 2.8.8 )

list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/scarab/cmake )

Expand Down Expand Up @@ -55,6 +55,15 @@ add_definitions( -DDL_MAX_PAYLOAD_SIZE=${Dripline_MAX_PAYLOAD_SIZE} )
set( PUBLIC_EXT_LIBS )
set( PRIVATE_EXT_LIBS )

# Pybind11
if( Dripline_BUILD_PYTHON )
find_package( Python3 REQUIRED COMPONENTS Interpreter Development )
set(PYBIND11_PYTHON_VERSION ${Python3_VERSION} CACHE STRING "")
find_package( pybind11 REQUIRED )
include_directories( ${Python3_INCLUDE_DIRS} )
list( APPEND PUBLIC_EXT_LIBS pybind11::module pybind11::embed )
endif( Dripline_BUILD_PYTHON )

# Threads are required by: test_scheduler
if( Dripline_ENABLE_TESTING )
find_package( Threads REQUIRED )
Expand Down Expand Up @@ -189,6 +198,7 @@ endif()
# Package Config #
##################

configure_file( ${PROJECT_SOURCE_DIR}/DriplineConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/DriplineConfig.cmake @ONLY )

pbuilder_do_package_config()
pbuilder_do_package_config(
INPUT_FILE ${PROJECT_SOURCE_DIR}/DriplineConfig.cmake.in
OUTPUT_FILE DriplineConfig.cmake
)
18 changes: 11 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
ARG img_repo=python
ARG img_tag=3.8-buster
ARG img_tag=3.12.1-slim-bookworm

FROM ${img_repo}:${img_tag}
# This FROM line includes a label so that the dependencies can be built by themselves by using the `--target` argument of `docker build`
FROM ${img_repo}:${img_tag} as base

ARG build_type=Release
ARG build_examples=FALSE
Expand All @@ -15,29 +16,32 @@ RUN apt-get update && \
apt-get --fix-missing -y install \
build-essential \
cmake \
gdb \
# gdb \
git \
libboost-chrono-dev \
libboost-filesystem-dev \
libboost-system-dev \
librabbitmq-dev \
libyaml-cpp-dev \
rapidjson-dev \
rapidjson-dev && \
# pybind11-dev \
wget && \
# wget && \
rm -rf /var/lib/apt/lists/*

# use pybind11_checkout to specify a tag or branch name to checkout
ARG pybind11_checkout=v2.6.2
ARG pybind11_checkout=v2.11.1
RUN cd /usr/local && \
git clone https://github.com/pybind/pybind11.git && \
cd pybind11 && \
git checkout ${pybind11_checkout} && \
mkdir build && \
cd build && \
cmake -DPYBIND11_TEST=FALSE .. && \
make -j3 install
make -j3 install && \
cd / && \
rm -rf /usr/local/pybind11

FROM base

# note that the build dir is *not* in source, this is so that the source can me mounted onto the container without covering the build target

Expand Down
4 changes: 4 additions & 0 deletions DriplineConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# DriplineConfig.cmake

@PACKAGE_INIT@

get_filename_component( Dripline_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH )

include( CMakeFindDependencyMacro )
Expand All @@ -13,3 +15,5 @@ if( NOT TARGET Dripline::@Dripline_FULL_TARGET_NAME@ )
include("${Dripline_CMAKE_DIR}/Dripline_Library_Targets.cmake")
endif()
endif()

check_required_components( Dripline )
1 change: 1 addition & 0 deletions executables/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ pbuilder_executables(
pbuilder_component_install_and_export(
COMPONENT Executables
EXETARGETS ${dripline_exe_PROGRAMS}
NAMESPACE Dripline::
)
1 change: 1 addition & 0 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ pbuilder_library(
pbuilder_component_install_and_export(
COMPONENT Library
LIBTARGETS Dripline
NAMESPACE Dripline::
)

pbuilder_install_headers( ${dripline_HEADERS} )

0 comments on commit c781818

Please sign in to comment.