Skip to content
giangiac edited this page Aug 13, 2020 · 9 revisions

How to compile the examples?

The examples are contained in folder $REPO/examples/. You have to add the option -DBuild Examples=ON to the cmake command. Consider that you initially compiled with:

$ mkdirbuild; cd build
$ cmake -DIqsPython=OFF ..
$ make

To add all examples to the compilation process, from folder $REPO/build/ just run:

$ cmake -DBuildExamples=ON ..
$ make

Executable files will be generated in folder $REPO/examples/bin/.

How to add a new example?

Write your C++ main function and add it to folder $REPO/examples/. Modify $REPO/examples/CMakeLists.txt by adding the instructions to compile it. If unfamiliar with CMake, give a look and simply reproduce the instructions needed to compile any of the other examples. Finally, remember to select option -DBuildExamples=ON when running the CMake command.

Clone this wiki locally