[Cmake] how to detect a macro
John Biddiscombe
john.biddiscombe@mirada-solutions.com
Thu, 15 May 2003 09:16:06 +0100
OK ignore this question, I like the (Klunky) version after all. It =
allows better control when doing this in several subdirs (I think)
> IF (MYMACROPRESENT)
> MyMacro("1" "2" "3")
> ENDIF (MYMACROPRESENT)
JB
> -----Original Message-----
> From: John Biddiscombe=20
> Sent: 15 May 2003 08:50
> To: cmake@public.kitware.com
> Subject: [Cmake] how to detect a macro
>=20
>=20
> If one does
>=20
> MACRO(MyMacro p1 p2 p3)
> do stuff here
> ENDMACRO(MyMacro)
>=20
> ...
>=20
> later I want to do
>=20
> IF (MyMacro)
> MyMAcro("1" "2" "3")
> ENDIF (MyMacro)
>=20
> But it never executes because IF(macroname) always returns=20
> false. I need to put a macro in an INCLUDE(OPTIONAL) file,=20
> and conditionally execute it in another.
>=20
> Is there a way to detect it's presence (apart from the slightly Klunky
> SET(MYMACROPRESENT 1)
> in the optional file
>=20
> and=20
> IF (MYMACROPRESENT)
> MyMAcro("1" "2" "3")
> ENDIF (MYMACROPRESENT)
>=20
> thanks
>=20
> JB
> _______________________________________________
> Cmake mailing list
> Cmake@public.kitware.com
> http://public.kitware.com/mailman/listinfo/cmake
>=20