[Cmake] BUG: multiple endifs are considered normal

Ken Martin ken.martin at kitware.com
Tue Sep 10 10:20:23 EDT 2002


Hey Amitha,

I checked in a small fix that should flag extra ENDIFs as an error.
CMake passes its tests but I didn't actually test to see if it fixed
your example. Let me know if it doesn't work for you.

Thanks
Ken

-----Original Message-----
From: cmake-admin at public.kitware.com
[mailto:cmake-admin at public.kitware.com] On Behalf Of Amitha Perera
Sent: Monday, September 09, 2002 11:52 PM
To: cmake at public.kitware.com
Subject: [Cmake] BUG: multiple endifs are considered normal

The sequence

IF( OPENGL_glu_LIBRARY )
  MESSAGE( "OKAY" )
ENDIF( OPENGL_glu_LIBRARY )
  MESSAGE( "NOT OKAY" )
ENDIF( OPENGL_glu_LIBRARY )

will execute both message statements when the variable is set, and
only the second when the variable is not set.

(The error: the middle line should be ELSE, not ENDIF.)

Amitha.
_______________________________________________
Cmake mailing list
Cmake at public.kitware.com
http://public.kitware.com/mailman/listinfo/cmake




More information about the CMake mailing list