Cmake: add compiler option in a more idiomatic way