Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for modular build structure. #204

Merged
merged 17 commits into from
Aug 18, 2024
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
28 changes: 28 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright René Ferdinand Rivera Morell 2024
# 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)

require-b2 5.2 ;

constant boost_dependencies :
/boost/asio//boost_asio
/boost/assert//boost_assert
/boost/core//boost_core
/boost/mp11//boost_mp11
/boost/system//boost_system
/boost/throw_exception//boost_throw_exception ;

project /boost/redis
: common-requirements
<include>include
;

explicit
[ alias boost_redis : : : : <library>$(boost_dependencies) ]
[ alias all : boost_redis test ]
;

call-if : boost-library redis
;

12 changes: 7 additions & 5 deletions test/Jamfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@

import ../config/checks/config : requires ;
import-search /boost/config/checks ;
import config : requires ;
import ac ;

# Configure openssl if it hasn't been done yet
using openssl ;

# Use these requirements as both regular and usage requirements across all tests
local requirements =
local requirements =
<library>/boost/redis//boost_redis
<define>BOOST_ASIO_NO_DEPRECATED=1
<define>BOOST_ASIO_DISABLE_BOOST_ARRAY=1
<define>BOOST_ASIO_DISABLE_BOOST_BIND=1
<define>BOOST_ASIO_DISABLE_BOOST_DATE_TIME=1
<define>BOOST_ASIO_DISABLE_BOOST_REGEX=1
<toolset>msvc:<cxxflags>"/bigobj"
<target-os>windows:<define>_WIN32_WINNT=0x0601
<include>../include
[ requires
cxx14_constexpr
cxx14_generic_lambdas
Expand All @@ -30,6 +31,7 @@ local requirements =
]
[ ac.check-library /openssl//ssl : <library>/openssl//ssl/<link>shared : <build>no ]
[ ac.check-library /openssl//crypto : <library>/openssl//crypto/<link>shared : <build>no ]
<library>/boost/test//boost_unit_test_framework
;


Expand All @@ -44,7 +46,7 @@ lib redis_test_common

# B2 runs tests in parallel, and some tests rely on having exclusive
# access to a Redis server, so we only run the ones that don't require a DB server.
local tests =
local tests =
test_low_level_sync_sans_io
test_low_level
test_request
Expand All @@ -54,7 +56,7 @@ local tests =
# Build and run the tests
for local test in $(tests)
{
run
run
$(test).cpp
redis_test_common/<link>static
: target-name $(test)
Expand Down