Switch from add_definitions to set cmake_cxx_flags.