Re: Discriminating Ada source code through compiler arguments
- From: Pascal Obry <pascal@xxxxxxxx>
- Date: Tue, 27 Dec 2005 12:01:35 +0100
ada_develop a écrit :
> Hello. I´m a newie in Ada and I want to known how can I pass arguments
> to the compiler to discriminate parts of a Ada source code. Something
> like the #ifdefs that we can use in the C programming languaje.
This really depends on your compiler. There is not standard for doing
this in Ada. Note that this is by design, #ifdef is considered bad
practice and a maintenance nightmare!
If you are using GNAT you can check gnatprep.
But a better solution is often to have one spec and multiple bodies for
different implementations. But without knowing more about your goal it
is difficult to devise the solution.
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
.
- References:
- Discriminating Ada source code through compiler arguments
- From: ada_develop
- Discriminating Ada source code through compiler arguments
- Prev by Date: Discriminating Ada source code through compiler arguments
- Next by Date: Re: GPS Ada, C setup
- Previous by thread: Discriminating Ada source code through compiler arguments
- Index(es):
Relevant Pages
|