@@ -43,6 +43,7 @@ Follow the steps below to develop and contribute to the project.
43
43
* CMake 3.23 or higher
44
44
* Python 3.10 or higher
45
45
* [Task] 3.40.0 or higher
46
+ * [uv] 0.7.10 or higher
46
47
47
48
## Set up
48
49
Initialize and update submodules:
@@ -52,33 +53,32 @@ git submodule update --init --recursive
52
53
53
54
If you want to open the project in an IDE, run the following command to install any necessary
54
55
dependencies from source:
56
+
55
57
``` shell
56
58
task deps:install-all
57
59
```
58
60
59
61
## Building
60
62
61
- The library can be built directly using [ CMake ] ( #using-cmake ) or indirectly using
62
- [ Task ] ( #using-task ) .
63
+ The library can be built via [ Task ] ( #building- using-task ) or directly with
64
+ [ CMake ] ( #building- using-cmake ) .
63
65
64
- ### Using Task
66
+ ### < a id = " building-using-task " /> Using Task
65
67
66
- To build all targets:
67
- ``` shell
68
- task build:all
69
- ```
68
+ To build all libraries:
70
69
71
- To build an executable containing all unit tests:
72
70
``` shell
73
- task build:unit-test-all
71
+ task ystdlib:build-release
74
72
```
75
73
76
- To build an executable containing a single library's unit tests:
74
+ To build a subset of libraries, set the [ ` ystdlib_LIBRARIES ` parameter] ( #ystdlib_libraries ) . For
75
+ example:
76
+
77
77
``` shell
78
- task build:unit-test- < lib_name >
78
+ task ystdlib:build-release ystdlib_LIBRARIES= " containers;io_interface "
79
79
```
80
80
81
- ### Using CMake
81
+ ### < a id = " building-using-cmake " /> Using CMake
82
82
83
83
To build all libraries, run:
84
84
@@ -87,37 +87,57 @@ cmake -S . -B ./build
87
87
cmake --build ./build
88
88
```
89
89
90
- To build a subset of libraries, set the variable ` ystdlib_LIBRARIES ` to a semicolon-separated (` ; ` )
91
- list of library names. The library names match their [ directory name in src/] ( ./src/ystdlib ) . For
90
+ To build a subset of libraries, set the [ ` ystdlib_LIBRARIES ` parameter] ( #ystdlib_libraries ) . For
92
91
example:
93
92
94
93
``` shell
95
94
cmake -S . -B ./build -Dystdlib_LIBRARIES=" containers;io_interface"
96
95
cmake --build ./build
97
96
```
98
97
99
- > [ !NOTE]
100
- > Internal dependencies of the libraries you choose will be automatically built, even if you don't
101
- > explicitly specify them. In the example, specifying ` io_interface ` automatically adds
102
- > ` wrapped_facade_headers ` to the build.
103
-
104
98
## Installing
105
99
106
- After [ building] ( #building ) , install with:
100
+ The library can be installed via [ Task] ( #installing-using-task ) or directly with
101
+ [ CMake] ( #installing-using-cmake ) .
102
+
103
+ ### <a id =" installing-using-task " />Using Task
104
+
105
+ To build and install all libraries, run:
106
+
107
+ ``` shell
108
+ task ystdlib:install-release INSTALL_PREFIX=" $HOME /.local"
109
+ ```
110
+
111
+ To build and install a subset of libraries, set the
112
+ [ ` ystdlib_LIBRARIES ` parameter] ( #ystdlib_libraries ) . For example:
113
+
114
+ ``` shell
115
+ task ystdlib:install-release \
116
+ INSTALL_PREFIX=" $HOME /.local" \
117
+ ystdlib_LIBRARIES=" containers;io_interface"
118
+ ```
119
+
120
+ ### <a id =" installing-using-cmake " />Using CMake
121
+
122
+ After [ building] ( #building-using-cmake ) , to install all built libraries, run:
107
123
108
124
``` shell
109
125
cmake --install " ./build" --prefix " $HOME /.local"
110
126
```
111
127
112
128
## Testing
129
+
113
130
To build and run all unit tests:
131
+
114
132
``` shell
115
- task test-all
133
+ task test:run-debug
116
134
```
117
135
118
- To build and run unit tests for a specific library:
136
+ To build and run unit tests for a subset of libraries, set the
137
+ [ ` ystdlib_LIBRARIES ` parameter] ( #ystdlib_libraries ) . For example:
138
+
119
139
``` shell
120
- task test- < lib_name >
140
+ task test:run-debug ystdlib_LIBRARIES= " containers;io_interface "
121
141
```
122
142
123
143
When generating a testing target, the CMake variable ` BUILD_TESTING ` is followed (unless overruled
@@ -144,4 +164,39 @@ task -a
144
164
```
145
165
Look for all tasks under the ` lint ` namespace (identified by the ` lint: ` prefix).
146
166
167
+ ## Build and install parameters
168
+
169
+ The following parameters are common between multiple tasks and CMake.
170
+
171
+ ### ` ystdlib_LIBRARIES `
172
+
173
+ The parameter/variable ` ystdlib_LIBRARIES ` can be used to target a subset of libraries, by setting
174
+ it to a semicolon-separated (` ; ` ) list of library names. The library names match their
175
+ [ directory name in ` src/ ` ] ( ./src/ystdlib ) .
176
+
177
+ > [ !NOTE]
178
+ > Internal dependencies of the libraries you choose will be automatically built, even if you don't
179
+ > explicitly specify them. In the following examples, specifying ` io_interface ` automatically adds
180
+ > ` wrapped_facade_headers ` to the build.
181
+
182
+ #### Using Task
183
+
184
+ Set by adding it after the task name. For example:
185
+
186
+ ``` shell
187
+ task ystdlib:build-release ystdlib_LIBRARIES=" containers;io_interface"
188
+ ```
189
+
190
+ Not all tasks support ` ystdlib_LIBRARIES ` . You can check if a task supports it by reading its
191
+ description (run ` task -a ` to view all tasks and descriptions).
192
+
193
+ #### Using CMake
194
+
195
+ Set using the ` -D ` flag in the generation step. For example:
196
+
197
+ ``` shell
198
+ cmake -S . -B ./build -Dystdlib_LIBRARIES=" containers;io_interface"
199
+ ```
200
+
147
201
[ Task ] : https://taskfile.dev
202
+ [ uv ] : https://docs.astral.sh/uv
0 commit comments