Add function for coverage collection
Edit CMakeLists.txt clear some flags