Skip to content

Commit 2eaa7bf

Browse files
committed
🔥 [cmake] remove boost headers
1 parent 4a3786f commit 2eaa7bf

File tree

5 files changed

+5
-40
lines changed

5 files changed

+5
-40
lines changed

CMakeLists.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
# Distributed under the Boost Software License, Version 1.0.
55
# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
66
#
7-
cmake_minimum_required(VERSION 3.10)
7+
cmake_minimum_required(VERSION 3.12)
88
project(Boost.DI LANGUAGES CXX)
99

1010
include(GNUInstallDirs)
1111

12-
find_package(Boost REQUIRED COMPONENTS headers)
13-
1412
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1513

1614
if(NOT DEFINED CMAKE_CXX_STANDARD)
@@ -25,13 +23,10 @@ target_include_directories(
2523
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
2624
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/extension/include>
2725
)
28-
target_link_libraries(${PROJECT_NAME} INTERFACE Boost::headers)
29-
3026
option(BOOST_DI_OPT_BUILD_TESTS "Build and perform Boost.DI tests" ${PROJECT_IS_TOP_LEVEL})
3127

3228
if(BOOST_DI_OPT_BUILD_TESTS)
3329
enable_testing()
34-
add_subdirectory(extension/test)
3530
add_subdirectory(test)
3631
endif()
3732

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public:
273273
example(Exchange exchange, Engine engine)
274274
: exchange(std::move(exchange)), engine(std::move(engine))
275275
{ }
276-
276+
277277
private:
278278
Exchange exchange;
279279
Engine engine;

conanfile.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
from conans import ConanFile, CMake
22

3-
43
class DI(ConanFile):
54
name = "DI"
65
version = "latest"
76
url = "https://github.com/boost-ext/di"
87
license = "Boost"
9-
description = "[Boost::ext].DI - C++14 Dependency Injection Library"
8+
description = "boost-ext.di - C++14 Dependency Injection Library"
109
settings = "os", "compiler", "arch", "build_type"
1110
exports_sources = "include/*"
1211
no_copy_source = True
1312

1413
def package(self):
1514
self.copy("*.hpp")
16-

meson.build

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
project('boost_di', 'cpp',
1+
project('boost_di', 'cpp',
22
version: '1.1.0',
33
license: 'boost',
44
default_options : ['warning_level=3', 'cpp_std=c++14']
@@ -10,7 +10,7 @@ boost_di_dep = declare_dependency(
1010

1111
if not meson.is_subproject()
1212
install_headers('include/boost/di.hpp', subdir: 'di')
13-
13+
1414
pkgc = import('pkgconfig')
1515
pkgc.generate(name: 'boost_di',
1616
version: meson.project_version(),
@@ -20,7 +20,6 @@ endif
2020

2121

2222
if get_option('BOOST_DI_OPT_BUILD_TESTS')
23-
subdir('extension/test')
2423
subdir('test')
2524
endif
2625

test/ft/di_bind.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,33 +1386,6 @@ test bind_to_ctor_multiple_placeholders = [] {
13861386
};
13871387

13881388

1389-
test bind_to_const_ref_sharedptr_via_placeholder = [] {
1390-
struct i {
1391-
virtual ~i() noexcept = default;
1392-
virtual int get_value() = 0;
1393-
};
1394-
1395-
struct impl : i {
1396-
int get_value() override { return 5; }
1397-
};
1398-
1399-
struct app {
1400-
explicit app(const std::shared_ptr<i>& p)
1401-
: value {p->get_value()}
1402-
{}
1403-
int value;
1404-
};
1405-
1406-
const auto injector = di::make_injector(
1407-
di::bind<i>().to<impl>(),
1408-
di::bind<app>(di::placeholders::_)
1409-
);
1410-
1411-
auto object = injector.create<app>();
1412-
1413-
expect(5 == object.value);
1414-
};
1415-
14161389
test bind_to_ctor_short_notation = [] {
14171390
struct c {
14181391
c(int a, int b) : a{a}, b{b} {}

0 commit comments

Comments
 (0)