Re: Custom compilers?
Roman Kennke <[email protected]> Wed, 25 Jun 2008 23:04:23 +0200
| Newsgroups | gmane.comp.java.ant-contrib.devel |
|---|---|
| Message-ID | <1214427863.6467.44.camel@moonlight> |
Hi Mirko. > > > it's definitely possible, but you'd have to write your own cpptasks > > compiler > > > adapter. > > > > Interesting. Do you think it is possible to write one adapter that can > > be configured (e.g. reads all necessary information like > > path-to-executable from properties, etc)? > > That, too, should be possible, in my opinion. In practice, your Ant script > will still have to make accommodations for various differences between the > target platforms (library naming scheme, custom optimization options, > etc.). You can find an old article that I wrote long time ago still on-line > at DDJ: http://www.ddj.com/architect/184405433 > > cpptasks encapsulates things like include path, library path, > multi-threading level, warning level, and output type, but the > <compilerarg> elements will still contain literal switches that are custom > to a particular compiler. You could introduce additional abstract elements > like, for example, <optimization level="..."/> or <compliance level="posix"> > to give you a higher-level view of things and have the > compiler adapter figure out what it means on command-line level. I imagine > there will still be some platform-specific odds and ends that just need to > go into their own conditional <compilerarg>. Ah, compilerarg is no problem I think. Right now we are using a Make-based build system and we already have to deal with that. We basically have many different configurations for the target systems, each with their own set of compiler/linker/etc executable paths, compiler switches, etc. I would need to do something similar with ant and cpptasks. I think I can implement/extend a compiler adapter for my use cases. > Back when I was working on this, I actually developed an XML-based "option > description language" that provided an abstract description of a compiler's > options (for example, "-l is a boolean option and means ...", "-r can be > followed by a number between 1 and 4, where 1 means ..., 2 means ..., ...", > etc.). This was actually used for automatically creating an Eclipse GUI, but > you could come up with a similar description language for generic cpptasks > compiler adapters. Interesting. Sounds like a reasonable idea. /Roman -- http://kennke.org/blog/ ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Ant-contrib-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBIYrLXu8ApkxNPXNERApIjAJ4v16jEDSpPKnW/AZ8owsiJ1N1yGwCgssGT InsEJ29er9KUcDEKSEaAgh8= =YYgQ -----END PGP SIGNATURE-----