LibMWR contains types and utilities shared between all MachineWare projects.
Clone repository and update submodules if you want to build unit tests:
git clone https://github.com/machineware-gmbh/mwr.git --recursive
cd mwr
git submodule update --init
Building mwr
requires cmake >= 3.11
. During configuration, you must state
whether to build the unit tests and the example programs:
-DMWR_BUILD_TESTS=[ON|OFF]
: build unit tests (defaultOFF
)-DMWR_LINTER=<string>
: linter program to use (default<empty>
)
mkdir -p BUILD/RELEASE/BUILD
cd BUILD/RELEASE/BUILD
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=.. \
-DMWR_BUILD_TESTS=ON
make -j 4
make test
make install
If everything went well, the following artifacts will have been installed:
- mwr headers in
BUILD/RELEASE/include
- mwr library in
BUILD/RELEASE/lib
You can use mwr
as a submodule within cmake
projects. For example:
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/mwr)
...
target_link_libraries(my_target mwr)
This project is licensed under the Apache-2.0 license - see the LICENSE file for details.