Skip to content

Commit 73e5043

Browse files
committed
Add a dependency (fmt) and use it
1 parent f3fdf6b commit 73e5043

File tree

3 files changed

+31
-29
lines changed

3 files changed

+31
-29
lines changed

CMakePresets.json

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
{
2-
"version": 8,
3-
"cmakeMinimumRequired": {
4-
"major": 3,
5-
"minor": 28,
6-
"patch": 1
7-
},
8-
"configurePresets": [
9-
{
10-
"name": "default",
11-
"binaryDir": "${sourceDir}/build",
12-
"generator": "Ninja",
13-
"cacheVariables": {
14-
"CMAKE_TOOLCHAIN_FILE": {
15-
"type": "PATH",
16-
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
17-
},
18-
"VCPKG_INSTALLED_DIR": {
19-
"type": "PATH",
20-
"value": "${sourceDir}/../angohr-installed"
21-
},
22-
"VCPKG_TARGET_TRIPLET": {
23-
"type": "STRING",
24-
"value": "x64-linux-shared"
25-
}
2+
"version": 8,
3+
"cmakeMinimumRequired": {
4+
"major": 3,
5+
"minor": 28,
6+
"patch": 1
7+
},
8+
"configurePresets": [
9+
{
10+
"name": "default",
11+
"binaryDir": "${sourceDir}/build",
12+
"generator": "Ninja",
13+
"cacheVariables": {
14+
"CMAKE_TOOLCHAIN_FILE": {
15+
"type": "PATH",
16+
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
17+
},
18+
"VCPKG_INSTALLED_DIR": {
19+
"type": "PATH",
20+
"value": "${sourceDir}/vcpkg-installed"
21+
},
22+
"VCPKG_TARGET_TRIPLET": {
23+
"type": "STRING",
24+
"value": "x64-linux-dynamic"
2625
}
2726
}
28-
]
29-
}
30-
27+
}
28+
]
29+
}

angohr/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
find_package(fmt CONFIG REQUIRED)
2+
13
add_library(core)
24
target_sources(core
35
PUBLIC
46
FILE_SET CXX_MODULES FILES
57
core.cpp
68
ello.cpp)
9+
target_link_libraries(core PRIVATE fmt::fmt)
710

811
add_executable(angohr angohr.cpp)
912

angohr/ello.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module;
22

3-
#include <iostream>
3+
#include <fmt/core.h>
44

55
export module core : iface.ello;
66

@@ -13,6 +13,6 @@ export class ello {
1313

1414
ello::ello() = default;
1515
void ello::hello() {
16-
std::cout << "Why hello!\n";
16+
fmt::print("Why hello!!!\n");
1717
}
1818
}

0 commit comments

Comments
 (0)