Generalize CMakeLists.txt to the entire project

This commit also update the README.md  and add test harness allowing
to easily run the smoke tests.