Wash and brush your pumpkin. Empty it, cut into small cubes, without peeling it.
Cook it in a pot, covering with salted water. Cook over medium heat for 30 minutes.
Preheat your oven to 200°C/392°F.
Drain the pumpkin.
In a pot, brown the pressed garlic for a few minutes in a little oil, then add the pumpkin again. Add the cream, half the grated Comté cheese. Salt, pepper and add the nutmeg. Mix well by heating over medium heat for 5 minutes. Everything will form a kind of puree.
In a gratin dish, pour a knob of olive oil then the pumpkin mixture.
Sprinkle the rest of the Comté on top and bake for 30 to 40 minutes until the gratin is browned to your liking.
Notes
You can also slide some bacon in your gratin or make it with pumpkin, it also works very well.