Add custom gcc flags to CmakeLists.txt
Use range based for instead of iterators