The most accurate method is to pump up the tires to the correct pressure. Put a piece of tape on the front tire's tread area. Sit on the bike and line up the tape with the ground. This is point A. While sitting on the bike, slowly rotate the front tire exactly one revolution so that the tape is again lined up with the ground. This is point B. Measure the distance from point A to point B and enter this value (in mm) to the bike's computer. Try not to wiggle the front wheel when moving from point A to point B. A 700c tire should measure around 2100 mm.
Repeat 3x to obtain an average reading.