Solved problem 7.
Smarter CMakeLists.txt. Solved problem 8.