[Cmake] CMake bug: Nested identical IF statements

Ken Martin ken.martin at kitware.com
Mon Aug 26 14:21:32 EDT 2002


Hey Fred,

This has been fixed in CMake 1.4 patch 4.

Thanks
Ken

> -----Original Message-----
> From: cmake-admin at public.kitware.com
> [mailto:cmake-admin at public.kitware.com]On Behalf Of Wheeler, Fred
> (Research)
> Sent: Monday, August 26, 2002 2:01 PM
> To: CMake List (E-mail)
> Subject: [Cmake] CMake bug: Nested identical IF statements
>
>
> If I put the following in a CMakeLists.txt file,
>
> SET( X "NO" )
> IF( X )
> MESSAGE( "INSIDE OUTER, BEFORE INNER" )
> IF( X )
> MESSAGE( "INSIDE OUTER, INSIDE INNER" )
> ENDIF( X )
> MESSAGE( "INSIDE OUTER, AFTER INNER" )
> ENDIF( X )
>
> I would not expect any of the three messages to get
> printed.  But, the third message does get
> printed.  This is the output,
>
> INSIDE OUTER, AFTER INNER
>
> It is as if the first ENDIF( X ) terminates both IF( X )
> conditionals.
>
> When X is set to "YES", all three messages get printed, as expected.
>
> I have not experimented with the effect on ELSE clauses.
>
> My cmake executable prints that it is version 1.4, but I'm
> certain it is version 1.4.3, build from
> the source in Cygwin.
>
> Fred Wheeler
> _______________________________________________
> Cmake mailing list
> Cmake at public.kitware.com
> http://public.kitware.com/mailman/listinfo/cmake




More information about the CMake mailing list