def METHOD_NAME(self, temp_env):
    s = spack.spec.Spec("cmake-client cppflags=-g").concretized()
    s.package.flag_handler = add_o3_to_build_system_cflags
    spack.build_environment.setup_package(s.package, False)
    assert "-g" in os.environ["SPACK_CPPFLAGS"]
    assert "CPPFLAGS" not in os.environ
    assert s.package.cmake_flag_args == ["-DCMAKE_C_FLAGS=-O3"]