Part 4 : Several useful CMake functions

Before going further in this tutorial, we have to develop two small functions which will simplify the rest of the tutorial.

These two functions will be in the file runExample.cmake.

First we have to defined two target : We have also to define the output directory of all the produced files.

The header of the file runExample.cmake is :

1
2
3
4
5
6
add_custom_target(run_all)
add_custom_target(plot_all)

add_dependencies(plot_all run_all)

set(OUTPUT_PERF_DIR "${CMAKE_BINARY_DIR}/Performances")