Correctly set cmake cxx flags.