some changement on for_each and adding C++11 on cmake properties