Version française
Home     About     Download     Resources     Contact us    
Browse thread
Conditional compilation
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andre Nathan <andre@d...>
Subject: Re: [Caml-list] Conditional compilation
On Mon, 2009-08-17 at 22:00 -0400, Edgar Friendly wrote:
> Is there a better way to do this?  The path I'm following is looking
> very byzantine compared to C's [-DFOO] + [#ifdef FOO].

In ospec I use

  -pp "camlp4o Camlp4MacroParser.cmo -D FOO"

which can then be tested in the code with

IFDEF FOO THEN
  ...
END


HTH,
Andre