-
Notifications
You must be signed in to change notification settings - Fork 74
Q&A
giangiac edited this page Aug 13, 2020
·
9 revisions
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/
.
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.