2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# Installation And Usage
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								This chapter provides all the necessary information to obtain and build the code using **mp-units** .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								It also describes how to build or distribute the library and generate its documentation.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## C++ compiler support { #cpp-compiler-support }
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								!!! info
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    **mp-units**  library tries to provide the best user experience possible with the C++ language.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    To achieve that, it extensively uses C++20 features and the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [explicit object parameter ](https://en.cppreference.com/w/cpp/language/member_functions#Explicit_object_parameter )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    from C++23.
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 11:28:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    Even though the library benefits from C++23 (if available), C++20 is enough to compile and
							 
						 
					
						
							
								
									
										
										
										
											2023-08-26 19:45:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    use all of the library's functionality. C++23 features are hidden behind
							 
						 
					
						
							
								
									
										
										
										
											2023-08-27 21:37:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    a [preprocessor macro ](../users_guide/framework_basics/systems_of_quantities.md#defining-quantities )
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    providing a backward-compatible way to use it.
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 11:28:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								The below table provides the minimum compiler version required to compile the code using the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								specific feature:
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 11:28:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								| Feature              | gcc  | clang | apple-clang | MSVC |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								|----------------------|:----:|:-----:|:-----------:|:----:|
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| **Minimum support**   |  12  |  16   |     15      | None |
							 
						 
					
						
							
								
									
										
										
										
											2024-01-23 23:06:25 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								| ** `std::format` **    |  13  |  17   |    None     | None |
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								| **C++ modules**       | None |  17   |    None     | None |
							 
						 
					
						
							
								
									
										
										
										
											2024-01-19 19:38:51 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								| **C++23 extensions**  |  14  |  18   |    None     | None |
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								More requirements for C++ modules support can be found in the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[CMake's documentation ](https://cmake.org/cmake/help/latest/manual/cmake-cxxmodules.7.html ).
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Modules
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								The **mp-units**  library provides the following C++ modules.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```mermaid
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								flowchart TD
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    mp_units --- mp_units.systems --- mp_units.core
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-07 15:45:15 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								| C++ Module         | CMake Target         | Contents                                                 |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								|--------------------|----------------------|----------------------------------------------------------|
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| `mp_units.core`     | `mp-units::core`      | Core library framework and systems-independent utilities |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| `mp_units.systems`  | `mp-units::systems`   | All the systems of quantities and units                  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								| `mp_units`          | `mp-units::mp-units`  | Core + Systems                                           |
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 11:28:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								!!! note
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    C++ modules are provided within the package only when [`cxx_modules` ](#cxx_modules ) Conan
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    option is set to `True` .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Repository structure and dependencies
  
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								This repository contains three independent CMake-based projects:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  _./src_ 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    -  header-only project containing whole **mp-units**  library
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    -  _./src/CMakeList.txt_ file is intended as an **entry point for library users** 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    -  in case this library becomes part of the C++ standard, it will have no external dependencies
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      but until then, it depends on the following:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        -  [gsl-lite ](https://github.com/gsl-lite/gsl-lite ) to verify runtime contracts with
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          the `gsl_Expects`  macro,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        -  [{fmt} ](https://github.com/fmtlib/fmt ) to provide text formatting of quantities
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								          (if `std::format`  is not supported yet on a specific compiler).
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  _._ 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    -  project used as an **entry point for library development and CI/CD** 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    -  it wraps _./src_  project together with usage examples and tests
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    -  additionally to the dependencies of _./src_  project, it uses:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        -  [Catch2 ](https://github.com/catchorg/Catch2 ) library as a unit tests framework,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        -  [linear algebra ](https://github.com/BobSteagall/wg21/tree/master/include )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								          library based on proposal [P1385 ](https://wg21.link/P1385 ) used in some examples
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								          and tests.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  *./test_package* 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    -  CMake library installation and Conan package verification.
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								!!! important "Important: Library users should not use the top-level CMake file"
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    Top level _CMakeLists.txt_  file should only be used by **mp-units**  developers and contributors
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    as an entry point for the project's development. We want to ensure that everyone will build **ALL** 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    the code correctly before pushing a commit. Having such options would allow unintended issues to
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    leak to PRs and CI.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    This is why our projects have two entry points:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    -  _./CMakeLists.txt_ is **to be used by projects developers**  to build **ALL**  the project code
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      with really restrictive compilation flags,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    -  _./src/CMakeLists.txt_ contains only a pure library definition and **should be used by the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      customers** that prefer to use CMake's
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      [`add_subdirectory()` ](https://cmake.org/cmake/help/latest/command/add_subdirectory.html ) to
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								      handle the dependencies.
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-03 21:23:34 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    To learn more about the rationale, please check our
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 21:27:01 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    [FAQ ](faq.md#why-dont-we-have-cmake-options-to-disable-building-of-tests-and-examples ).
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Obtaining dependencies
  
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								This library assumes that most of the dependencies will be provided by the
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[Conan Package Manager ](https://conan.io/ ). If you want to obtain required
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								dependencies by other means, some modifications to the library's CMake files might be needed.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								The rest of the dependencies responsible for documentation generation are provided by
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								`python3-pip` . 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								### Conan quick intro
  
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								In case you are not familiar with Conan, to install it (or upgrade) just do:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```shell
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								pip3 install -U conan
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								After that, you might need to add a custom profile file for your development environment
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								in _~/.conan2/profiles_  directory. An example profile can look as follows:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```ini hl_lines="5" title="~/.conan2/profiles/gcc12"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[settings]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								arch=x86_64
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								build_type=Release
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								compiler=gcc
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								compiler.cppstd=20
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								compiler.libcxx=libstdc++11
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								compiler.version=12
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								os=Linux
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[conf]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								tools.build:compiler_executables={"c": "gcc-12", "cpp": "g++-12"}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								!!! tip "Setting the language version"
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    Please note that the **mp-units**  library requires at least C++20 to be set in a Conan profile
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 21:27:01 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    or forced via the Conan command line. If we do the former, we will not need to provide
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    `-s compiler.cppstd=20`  every time we run a Conan command line (as provided in the command
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    line instructions below).
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								!!! tip "Using Ninja as a CMake generator for Conan"
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 21:27:01 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    It is highly recommended to set Ninja as a CMake generator for Conan. To do so, we should
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    create a _~/.conan2/global.conf_  file that will set `tools.cmake.cmaketoolchain:generator` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    to one of the Ninja generators. For example:
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ```text title="~/.conan2/global.conf"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    tools.cmake.cmaketoolchain:generator="Ninja Multi-Config"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								!!! tip "Separate build folders for different configurations"
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    _~/.conan2/global.conf_  file may also set `tools.cmake.cmake_layout:build_folder_vars`  which
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [makes working with several compilers or build configurations easier ](https://docs.conan.io/2/reference/tools/cmake/cmake_layout.html#multi-setting-option-cmake-layout ).
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    For example, the below line will force Conan to generate separate CMake presets and folders for
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    each compiler and C++ standard version:
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```text title="~/.conan2/global.conf"
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    tools.cmake.cmake_layout:build_folder_vars=["settings.compiler", "settings.compiler.version", "settings.compiler.cppstd"]
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 21:27:01 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    In such a case, we will need to use a configuration-specific preset name in the Conan instructions
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    provided below rather than just `conan-default`  and `conan-release` 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    (e.g. `conan-gcc-13-23`  and `conan-gcc-13-23-release` )
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Build options
  
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								### Conan options
  
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[cxx_modules ](#cxx_modules ){ #cxx_modules  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								:   [:octicons-tag-24: 2.2.0][cxx modules support] · :octicons-milestone-24: `True` /`False`  (Default: `False` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    Configures CMake to add C++ modules to the list of default targets.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 14:20:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    [cxx modules support]: https://github.com/mpusz/mp-units/releases/tag/v2.2.0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[use_fmtlib ](#use_fmtlib ){ #use_fmtlib  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-23 22:36:56 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								:   [:octicons-tag-24: 2.2.0][use fmtlib support] · :octicons-milestone-24: `True` /`False`  (Default: `False` )
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 14:20:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    Forces usage of [{fmt} ](https://github.com/fmtlib/fmt ) library instead of the C++20 Standard
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    Library features.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [use fmtlib support]: https://github.com/mpusz/mp-units/releases/tag/v2.2.0
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								### Conan configuration properties
  
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[`user.build:all` ](#user-build-all ){ #user -build-all }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								:   [:octicons-tag-24: 0.8.0][build all support] · :octicons-milestone-24: `True` /`False`  (Default: `False` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    Enables compilation of all the source code, including tests and examples. To support this, it requires some additional Conan build dependencies described in
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    [Repository Structure and Dependencies ](#repository-structure-and-dependencies ).
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    It also runs unit tests during Conan build (unless
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [`tools.build:skip_test` ](https://docs.conan.io/2/reference/commands/config.html?highlight=tools.build:skip_test#conan-config-list )
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    configuration property is set to `True` ).
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 14:20:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    [build all support]: https://github.com/mpusz/mp-units/releases/tag/v0.8.0
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[`user.build:skip_la` ](#user-skip-la ){ #user -skip-la }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								:   [:octicons-tag-24: 0.8.0][skip la support] · :octicons-milestone-24: `True` /`False`  (Default: `False` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    If `user.build:all`  is enabled, among others, Conan installs the external
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    [wg21-linear_algebra ](https://conan.io/center/recipes/wg21-linear_algebra )
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    dependency and enables the compilation of linear algebra-based tests and usage examples.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    Such behavior can be disabled with this option.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [skip la support]: https://github.com/mpusz/mp-units/releases/tag/v0.8.0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								### CMake options
  
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[`MP_UNITS_BUILD_CXX_MODULES` ](#MP_UNITS_BUILD_CXX_MODULES ){ #MP_UNITS_BUILD_CXX_MODULES  }
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								:   [:octicons-tag-24: 2.2.0][build_cxx_modules support] · :octicons-milestone-24: `ON` /`OFF`  (Default: `OFF` )
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    Adds C++ modules to the list of default targets.
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    [build_cxx_modules support]: https://github.com/mpusz/mp-units/releases/tag/v2.2.0
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 14:18:57 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[`MP_UNITS_USE_FMTLIB` ](#MP_UNITS_USE_FMTLIB ){ #MP_UNITS_USE_FMTLIB  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-23 22:36:56 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								:   [:octicons-tag-24: 2.2.0][use fmtlib support] · :octicons-milestone-24: `ON` /`OFF`  (Default: `OFF` )
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 14:18:57 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    Forces usage of [{fmt} ](https://github.com/fmtlib/fmt ) library instead of the C++20 Standard
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    Library features.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [use fmtlib support]: https://github.com/mpusz/mp-units/releases/tag/v2.2.0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								[`MP_UNITS_AS_SYSTEM_HEADERS` ](#MP_UNITS_AS_SYSTEM_HEADERS ){ #MP_UNITS_AS_SYSTEM_HEADERS  }
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								:   [:octicons-tag-24: 2.0.0][as system headers support] · :octicons-milestone-24: `ON` /`OFF`  (Default: `OFF` )
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    Exports library as system headers.
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    [as system headers support]: https://github.com/mpusz/mp-units/releases/tag/v2.0.0
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:00 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								[`MP_UNITS_BUILD_LA` ](#MP_UNITS_BUILD_LA ){ #MP_UNITS_BUILD_LA  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								:   [:octicons-tag-24: 2.0.0][build la support] · :octicons-milestone-24: `ON` /`OFF`  (Default: `ON` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    Enables building code depending on the linear algebra library.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [build la support]: https://github.com/mpusz/mp-units/releases/tag/v2.0.0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[`MP_UNITS_IWYU` ](#MP_UNITS_IWYU ){ #MP_UNITS_IWYU  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								:   [:octicons-tag-24: 2.0.0][iwyu support] · :octicons-milestone-24: `ON` /`OFF`  (Default: `OFF` )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    Enables `include-what-you-use`  when compiling with a clang compiler.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    Additionally turns on [`MP_UNITS_AS_SYSTEM_HEADERS` ](#MP_UNITS_AS_SYSTEM_HEADERS ).
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [iwyu support]: https://github.com/mpusz/mp-units/releases/tag/v2.0.0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## CMake with presets support
  
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								It is recommended to use at least CMake 3.23 to build this project as this version introduced support
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								for CMake Presets schema version 4, used now by Conan to generate presets files. All build instructions
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								below assume that you have such support. If not, your CMake invocations have to be replaced with something
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								like:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```shell
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								mkdir build & &  cd build
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								cmake .. -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=< path_to_generators_dir > /conan_toolchain.cmake
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								cmake --build . --config Release
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-30 11:33:30 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								!!! tip
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    In case you can't use CMake 3.23 but you have access to CMake 3.20 or later, you can append
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    `-c tools.cmake.cmaketoolchain.presets:max_schema_version=2`  to the `conan install`  command
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    which will force Conan to use an older version of the CMake Presets schema.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Installation and reuse
  
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								There are many different ways of installing/reusing **mp-units**  in your project. Below we mention
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								only a few of many options possible.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								!!! important "Important: Prefer using Conan if possible"
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    The easiest and most recommended way to obtain **mp-units**  is with the Conan package manager.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    See [Conan + CMake (release) ](#conan-cmake-release ) for a detailed instruction.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### Copy
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								As **mp-units**  is a C++ header-only library you can simply copy all needed _src/*/include_  subdirectories
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								to your source tree.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								!!! note
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    In such a case, you are on your own to ensure all the dependencies are installed and their header
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    files can be located during the build. Please also note that some compiler-specific flags are needed
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    to make the code compile without issues.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### Copy + CMake
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								If you copy the whole **mp-units**  repository to your project's file tree, you can reuse CMake targets
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								defined by the library. To do so, **you should use _CMakeLists.txt_ file from the _./src_ directory** :
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```cmake
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								add_subdirectory(< path_to_units_folder > /src)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# ...
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								target_link_libraries(< your_target >  < PUBLIC | PRIVATE | INTERFACE >  mp-units::mp-units)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								!!! note
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    You are still on your own to make sure all the dependencies are installed and their header and CMake
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    configuration files can be located during the build.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### Conan + CMake (release)
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								!!! tip
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    If you are new to the Conan package manager, it is highly recommended to read
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [Obtaining Dependencies ](#obtaining-dependencies ) and refer to
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [Consuming packages ](https://docs.conan.io/2/tutorial/consuming_packages.html )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    chapter of the official Conan documentation for more information.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								**mp-units** releases are hosted on [Conan-Center ](https://conan.io/center/recipes/mp-units ).
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								The following steps may be performed to obtain an official library release:
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								1.  Create Conan configuration file (either _conanfile.txt_  or _conanfile.py_ ) in your 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   project's top-level directory and add **mp-units**  as a dependency of your project.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   For example, the simplest file may look as follows:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```ini title="conanfile.txt"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [requires]
							 
						 
					
						
							
								
									
										
										
										
											2023-12-09 19:03:45 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    mp-units/2.1.0
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 11:28:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    [options]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    mp-units:cxx_modules=True
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    [layout]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    cmake_layout
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [generators]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    CMakeToolchain
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    CMakeDeps
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								2.  Import **mp-units**  and its dependencies definitions to your project's build procedure 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								   with `find_package` :
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```cmake
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 12:32:12 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    find_package(mp-units REQUIRED)
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								3.  Link your CMake targets with **mp-units** : 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```cmake
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    target_link_libraries(< your_target >  < PUBLIC | PRIVATE | INTERFACE >  mp-units::mp-units)
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								4.  Download, build, and install Conan dependencies before running the CMake configuration step: 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```shell
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    conan install . -pr < your_conan_profile >  -s compiler.cppstd=20 -b=missing
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    cmake --preset conan-default
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    cmake --build --preset conan-release
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### Conan + CMake (Live At Head)
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								This chapter describes the procedure to Live At Head, which means using the latest stable version
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								of **mp-units**  all the time.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								!!! note
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    Please note that even though the Conan packages that you will be using are generated **ONLY** 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 14:12:25 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    for builds that are considered stable (passed our CI tests), some minor regressions may happen
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    (our CI and C++20 build environment is not perfect yet). Also, please expect that the library
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    interface might, and probably will, change occasionally. Even though we do our best, such
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    changes might not be reflected in the project's documentation right away.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								The procedure is similar to the one described in [Conan + CMake (release) ](#conan-cmake-release )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								with the following differences:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								1.  Before starting the previous procedure, add **mp-units**  remote to your Conan configuration: 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```shell
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    conan remote add conan-mpusz https://mpusz.jfrog.io/artifactory/api/conan/conan-oss
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								2.  In your Conan configuration file, provide the package identifier of the `mpusz/testing`  stream: 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```ini title="conanfile.txt" hl_lines="2"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [requires]
							 
						 
					
						
							
								
									
										
										
										
											2023-12-09 19:03:45 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    mp-units/2.2.0@mpusz/testing 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    [options]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    mp-units:cxx_modules=True
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    [layout]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    cmake_layout
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    [generators]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    CMakeToolchain
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    CMakeDeps
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    !!! tip
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        The identifiers of the latest packages can always be found in
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        [the project's README file ](https://github.com/mpusz/mp-units/blob/master/README.md ) or on
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        [the project's Artifactory ](https://mpusz.jfrog.io/ui/packages/conan:%2F%2Fmp-units ).
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								3.  Force Conan to check for updated recipes with `-u` : 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```shell
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    conan install . -pr < your_conan_profile >  -s compiler.cppstd=20 -b=missing -u
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### Install
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								In case you don't want to use Conan in your project and just want to install the **mp-units** 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-25 21:27:01 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								library on your file system and use `find_package(mp-units)`  from another repository to find it;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								it is enough to perform the following steps:
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```shell
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								conan install . -pr < your_conan_profile >  -s compiler.cppstd=20 -b=missing
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								mv CMakeUserPresets.json src
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								cd src
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								cmake --preset conan-default -DCMAKE_INSTALL_PREFIX=< your_installation_path > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								cmake --build --preset conan-release --target install
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Contributing (or just building all the tests and examples)
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								In case you would like to build all the **mp-units**  source code (with unit tests and examples),
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								you should:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								1.  Use the _CMakeLists.txt_  from the top-level directory. 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								2.  Run Conan with [`user.build:all` ](#user-build-all ) = `True` . 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```shell
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git clone https://github.com/mpusz/mp-units.git & &  cd units
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								conan build . -pr < your_conan_profile >  -s compiler.cppstd=23 -o cxx_modules=True -c user.build:all=True -b missing
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								The above will download and install all of the dependencies needed for the development of the library,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								build all of the source code, and run unit tests.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								If you prefer to build the project via CMake rather than Conan, then you should replace
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								the `conan build`  with `conan install`  command and then follow with a regular CMake build:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```shell
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								cmake --preset conan-default
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								cmake --build --preset conan-release
							 
						 
					
						
							
								
									
										
										
										
											2024-01-12 12:30:57 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								cmake --build --preset conan-release --target all_verify_interface_header_sets
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								cmake --build --preset conan-release --target test
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Building documentation
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Starting from **mp-units 2.0**  we are using [Material for MkDocs ](https://squidfunk.github.io/mkdocs-material/ )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								to build our documentation. The easiest way to install all the required dependencies
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								is with `pip` :
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```shell
							 
						 
					
						
							
								
									
										
										
										
											2023-12-27 20:35:35 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								pip install -U mkdocs-material mkdocs-rss-plugin
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								After that, you can either:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  easily [start a live server to preview the documentation as you write ](https://squidfunk.github.io/mkdocs-material/creating-your-site/#previewing-as-you-write ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 22:53:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ```shell
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    mkdocs serve
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  [build the documentation ](https://squidfunk.github.io/mkdocs-material/creating-your-site/#building-your-site ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 22:53:49 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ```shell
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    mkdocs build
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    ```
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Packaging
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								To test CMake installation and Conan packaging or create a Conan package run:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```shell
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								conan create . --user < username >  --channel < channel >  -pr < your_conan_profile >  -s compiler.cppstd=20 -o cxx_modules=True -c user.build:all=True -b missing
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								The above will create a Conan package and run tests provided in _./test_package_ directory.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-06 08:51:01 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Uploading **mp-units** package to the Conan server
  
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```shell
							 
						 
					
						
							
								
									
										
										
										
											2023-12-09 19:03:45 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								conan upload -r < remote-name >  --all mp-units/2.1.0@< user > /< channel > 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-21 10:55:18 +02:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								```