Added example as option to be built by cmake.
Excluded undefined function when not in DEBUG.