Minor fixes to CMakeLists.
Warning fixes.
Option for building examples.