Updated CMakeLists to autogen examples and tests