Procedure for MacOS system

System set up

In the case you need to set up a personal computer on MacOS from scratch, you may follow these steps.

> Check first that g++/clang++ is installed in typing in command line
g++ -v

(Follow the installation instruction if the OS proposes to install it.)

For the other dependencies (cmake, GLFW library), the easiest way is to use the package manager Homebrew.

Once Homebrew is installed, cmake and GLFW can be installed using a command line with the following instructions
# CMake tool to compile
brew install cmake

# The Library GLFW
brew install glfw
Note that once installed, you won't have to repeat these steps anymore.

Compile and execute the code

Once your system is set up, make a test to compile a test program (commands are similar to a Linux system).
> Open a command line in the root directory of your program
> Then type the following commands
# Generate the directory build/
mkdir build 

# Go to the build/ directory
cd build

# Run CMake
cmake ..
# A file Makefile should be generated

# Compile
make
# Make sure the compilation succeed, a file pgm should be created

# Go back to the root directory
cd ..

# Run the executable from the root directory
#  (possibly adapt to the name of your executable)
build/sample_code
Make sure that the last command ends with the run of the test code.
Notes

IDE

You are highly encouraged to use a complete IDE to edit the C++ code: it helps to use the library with auto-completion, to naviguate quickly through the files, as well as proposing debug tools.
In Linux/Ubuntu, you can install QtCreator with the following command
brew cask install qt-creator
You may follow these instructions for the use of QtCreator to edit and compile the code.