I have no idea what turns that message on for the F/A-18, but for the old JFTD-12A on our S-64 Sky Cranes, there is a small temp sensor bonded to the back side of the air intake. When it senses a temp of less than 30 degrees F, it triggers the caution light in the cockpit. If we then turn on the Anti-ice, which ports hot bleed air into the Bellmouth inlet, that sensor sees the temp rise and it will extinguish the caution light. When you turn off the Anti-ice, a few minutes later the caution light will come back on.
The JFTD-12A's on our Cranes are turbojet engines with a free turbine bolted on the back end that were also installed on the old NA T-39 Saber Liner and the Lockheed C-140 Jetstar.