Skip to content

Commit 8c8b359

Browse files
committed
use fmt header only
1 parent 0b74393 commit 8c8b359

5 files changed

Lines changed: 13 additions & 9 deletions

File tree

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# cpp_example_project
22

3-
> **Warning**
4-
> Until now only conan 1.x is supported. Support for conan 2.x will come soon.
5-
63
Ongoing project of the Zühlke Germany **Modern C++ Topic Group**.
74

85
With this project, we want to provide an example and starting point for C++ projects (embedded and otherwise), especially regarding tooling.

conanfile.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,21 @@
66
class HelloConan(ConanFile):
77
settings = 'os', 'compiler', 'build_type', 'arch'
88
generators = 'CMakeDeps', 'CMakeToolchain'
9+
default_options = {'fmt/*:header_only': True}
10+
11+
def config_options(self):
12+
if self.settings.get_safe('arch') == 'armv7':
13+
pass
14+
# options = Options()
15+
#options.values = conans.model.options.OptionsValues({'fmt/*:header_only': True})
16+
#self.options = options
917

1018
def configure(self):
1119
if self.settings.get_safe('arch') == 'armv7':
12-
self.requires = conans.model.requires.Requirements(['fmt/10.1.0', 'sml/1.1.6'])
13-
self.default_options = {'fmt/*:header_only': True}
20+
self.requires = conans.model.requires.Requirements(['fmt/10.0.0', 'sml/1.1.6'])
1421
else:
1522
self.requires = conans.model.requires.Requirements(['catch2/3.4.0', 'gtest/1.14.0', 'docopt.cpp/0.6.3',
16-
'fmt/10.1.0', 'spdlog/1.12.0', 'sml/1.1.8', 'nlohmann_json/3.11.2',
23+
'fmt/10.0.0', 'spdlog/1.12.0', 'sml/1.1.8', 'nlohmann_json/3.11.2',
1724
'boost/1.81.0', 'crowcpp-crow/1.0+5', 'cppzmq/4.9.0', 'protobuf/3.21.12'])
1825

1926
def build(self):

fuzz_test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ TARGET_LINK_LIBRARIES(
66
fuzz_tester
77
PRIVATE project_options
88
project_warnings
9-
fmt::fmt
9+
fmt::fmt-header-only
1010
-coverage
1111
-fsanitize=fuzzer,undefined,address)
1212
TARGET_COMPILE_OPTIONS(fuzz_tester PRIVATE -fsanitize=fuzzer,undefined,address)

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ TARGET_LINK_LIBRARIES(
4141
PRIVATE project_options
4242
project_warnings
4343
docopt_s
44-
fmt::fmt
44+
fmt::fmt-header-only
4545
spdlog::spdlog)
4646

4747
TARGET_INCLUDE_DIRECTORIES(intro PRIVATE ${CMAKE_BINARY_DIR}/generated)

src/boost.beast/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ FIND_PACKAGE(nlohmann_json REQUIRED)
44
FIND_PACKAGE(boost REQUIRED)
55

66
ADD_EXECUTABLE(test_boost_beast main.cpp)
7-
TARGET_LINK_LIBRARIES(test_boost_beast PRIVATE ${CMAKE_THREAD_LIBS_INIT} boost::boost nlohmann_json::nlohmann_json fmt::fmt)
7+
TARGET_LINK_LIBRARIES(test_boost_beast PRIVATE ${CMAKE_THREAD_LIBS_INIT} boost::boost nlohmann_json::nlohmann_json fmt::fmt-header-only)

0 commit comments

Comments
 (0)