In short here are some CMake things that are good to know.



Creates dependencies between targets , usually cmake can determine them automatically. add_dependencies typically used to specify inter target dependencies where at least one of the target is a custom target.

Add generator

Creates a generator (babelc) which can be used to generate ipc headers.

set(${RESULT} ${file_var} PARENT_SCOPE)Return from function calls

There are two ways of returning something to the caller.

The first way:


This function will create a new variable called BABELC_OUT_DIR which can be accessed by the parent scope. The next approach is to give a resulting variable where the variable name consists and is provided by the caller.

This way the caller provides the variable.

A really nice alias which gives the output of the graph in a coloring way can be added to the .gitconfig file.


Thanks to whomever wrote this, its beautiful 🙂

There are some other nice graph ways at
StackOverflow -git graphs