Re: Delphi language support in CMake build system



On 2008-10-18, Rob Kennedy <me3@xxxxxxxxxxx> wrote:

But yes, your point remains: There is not a one-to-one correspondence
between primary input file extension and primary output file extension.
A DPR file can yield either an EXE file or a DLL. (Or anything else,
really. See the $OUTPUTEXT compiler directive.)

To state the obvious: the extensions are conventions for the IDE, the
actual compiler cares less:

1) the compiler will happily compile a file with any extension, as long as
the base name matches the unit (module) name.
2) The autobuilder has a list of extensions to search for, .pas mostly, FPC
also .pp
3) main programs in-source name (the program statement) is ignored, and
mainprograms don't have any filename convention at all, as far as the
compiler is concerned.

All this as a first order approx. There might be exceptions for "special"
projects/mainfile types.

If you just give dcc32 the names of your project files, it will go out
and compile the units it needs. (In fact, as you can see from the output
of c.pas, it looks like dcc32 can get a little confused if you ask it to
compile standalone units.) You don't need an external build system to
determine which of your units have been modified and which units depend
on them, or to compile each of those units separately. Delphi's compiler
does all that for you, not just by looking at file timestamps, but by
checking whether the interfaces of units have changed.

(note to Eric: this aspect is what I mean with "autobuilder" in my other
mails. Sorry if I didn't explain it there properly)

.



Relevant Pages

  • Re: ProDOS Plus
    ... Apple II's and ProDOS. ... They never wrote a compiler that wouldn't fit in half the memory ... Any practical extension will have to fit within the memory envelope ... I don't think any OS has ever maintained 100% compatibility with previous versions. ...
    (comp.sys.apple2)
  • Re: Multi precision floating point
    ... It's been stated in this thread that a Fortran program is not actually ... But consider a hypothetical compiler that acts as a conforming C ... as an *extension* provided by a conforming C implementation. ...
    (comp.lang.c)
  • Re: more idle thinking: SiMPL
    ... I am thinking of an odd piece of syntax: ... by extension: ... treatment of ';' could be a little more flexible than in C family languages, ... likely make an unreasonable headache for the compiler (AKA: ...
    (comp.lang.misc)
  • Re: Multi precision floating point
    ... extension is a string function called strdup. ... If it compiles on every ideal, conforming C compiler then it requires ... I believe that one common technique for using the features that you correctly point out are not part of standard C is to wrap them into a small part of your program, and write the main part in Standard C which calls a wrapper function when it wants to use a nonstandard feature. ...
    (comp.lang.c)
  • Re: Announcing: CHICKEN 2.3
    ... the `chicken-config' script has been removed, ... Generates tail-recursive C with full support for first-class ... The compiler can be customized in various ways. ... of extension libraries. ...
    (comp.lang.scheme)