@@ -43,6 +43,7 @@ Follow the steps below to develop and contribute to the project.
4343* CMake 3.23 or higher
4444* Python 3.10 or higher
4545* [Task] 3.40.0 or higher
46+ * [uv] 0.7.10 or higher
4647
4748## Set up
4849Initialize and update submodules:
@@ -52,33 +53,32 @@ git submodule update --init --recursive
5253
5354If you want to open the project in an IDE, run the following command to install any necessary
5455dependencies from source:
56+
5557``` shell
5658task deps:install-all
5759```
5860
5961## Building
6062
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 ) .
6365
64- ### Using Task
66+ ### < a id = " building-using-task " /> Using Task
6567
66- To build all targets:
67- ``` shell
68- task build:all
69- ```
68+ To build all libraries:
7069
71- To build an executable containing all unit tests:
7270``` shell
73- task build:unit-test-all
71+ task ystdlib:build-release
7472```
7573
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+
7777``` shell
78- task build:unit-test- < lib_name >
78+ task ystdlib:build-release ystdlib_LIBRARIES= " containers;io_interface "
7979```
8080
81- ### Using CMake
81+ ### < a id = " building-using-cmake " /> Using CMake
8282
8383To build all libraries, run:
8484
@@ -87,37 +87,57 @@ cmake -S . -B ./build
8787cmake --build ./build
8888```
8989
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
9291example:
9392
9493``` shell
9594cmake -S . -B ./build -Dystdlib_LIBRARIES=" containers;io_interface"
9695cmake --build ./build
9796```
9897
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-
10498## Installing
10599
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:
107123
108124``` shell
109125cmake --install " ./build" --prefix " $HOME /.local"
110126```
111127
112128## Testing
129+
113130To build and run all unit tests:
131+
114132``` shell
115- task test-all
133+ task test:run-debug
116134```
117135
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+
119139``` shell
120- task test- < lib_name >
140+ task test:run-debug ystdlib_LIBRARIES= " containers;io_interface "
121141```
122142
123143When generating a testing target, the CMake variable ` BUILD_TESTING ` is followed (unless overruled
@@ -144,4 +164,39 @@ task -a
144164```
145165Look for all tasks under the ` lint ` namespace (identified by the ` lint: ` prefix).
146166
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+
147201[ Task ] : https://taskfile.dev
202+ [ uv ] : https://docs.astral.sh/uv
0 commit comments