Skip to content

How to Build

iwatake edited this page Jan 25, 2022 · 6 revisions

Download code

# git clone git@github.com:iwatake2222/rotation_master.git
git clone https://github.com/iwatake2222/rotation_master.git

cd rotation_master
git submodule update --init --recursive --recommend-shallow --depth 1

Build and Run

Build in Linux

  • Create a docker container if needed
    • please modify options for your environment
docker create -it -v /mnt/c/iwatake/devel:/root/devel -v /etc/localtime:/etc/localtime:ro -e DISPLAY="192.168.1.2:0" -w /root/ -p 8888:8888  --name=ubuntu20_rotation_master ubuntu:20.04
docker start ubuntu20_rotation_master
docker exec -it ubuntu20_rotation_master bash
  • Install requirements
apt update
apt install -y cmake g++
apt install -y libglu1-mesa-dev mesa-common-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev

# You may also need
# apt install -y xorg-dev
  • Build and Run
cd <path-to-rotation_master>/src/
mkdir -p build && cd build
cmake ..
make -j4

./rotation_master

Build in Windows + Visual Studio 2019

  • Configure and Generate a new project using cmake-gui for Visual Studio 2019 64-bit
    • Where is the source code : <path-to-rotation_master>/src/
    • Where to build the binaries : <path-to-build (any)>
  • Open rotation_master.sln
    • Set rotation_master project as a startup project, then build and run

Build in MacOS

todo

Test

Test in Linux

  • After building the project, run the following command in the build directory
ctest

Test in Windows

  • After building the project in Visual Studio, open Test Explorer and click Run All Tests

Measure coverage

Linux

cd <path-to-rotation_master>/src/
bash ./run_coverage.sh