Re: Delphi language support in CMake build system



On Oct 20, 11:54 am, Bart <broersma.juda_ANTISP...@xxxxxxxxxx> wrote:
Op Mon, 20 Oct 2008 08:45:13 -0700 (PDT) schreef
"eric.lemi...@xxxxxxxxx" <e...@xxxxxxxxxxx>:





On Oct 17, 11:53 pm, Rob Kennedy <m...@xxxxxxxxxxx> wrote:
eric.lemi...@xxxxxxxxx wrote:
...
make CMake aware of this.

What, in particular, does CMake need to be aware of?

After CMake finds the Delphi compiler (or any language compiler/
translator/interpreter for that matter), it does a sanity check by
building a small program in that language.  Without having to
customize
a lot of CMake's internal scripting, the tool, by default, will assume
a
typical C/C++ compile/link cycle to build a simple test program.

Example (on most Unix systems):

     $ ls
     a.c
     $ cat a.c
     int main () { return 0; }
     $ cc -c a.c
     $ ls
     a.c a.o
     $ cc a.o -o a
     $ ls
     a a.c a.o
     $ ./a
     $ echo $?
     0

This doesn't really apply to Delphi since, AFAICT, there is no way to
compile and then link a simple Delphi program.  (There probably is and
I'm just not aware of it.  Assuming there is, could someone post an
example, complete with build commands?  If there isn't, I'll have to
do a lot more customization of CMake's internal scripting.)

Thanks,
Eric.

Delphi used to have a commandline compiler (in D3 it was called
dcc32.exe)

F:> type hello.pas
{$APPTYPE CONSOLE}
program hallo_world;
begin
  writeln('Hello World');
end.

F:>dcc32 hello.pas
Delphi for Win32  Version 10.0  Copyright (c) 1983,97 Borland
International
hello.pas(8)
9 lines, 0.60 seconds, 10184 bytes code, 1377 bytes data.

F:>dir hello*

HELLO    PAS            87  20-10-08  19:48 hello.pas
HELLO    EXE        15.360  20-10-08  19:49 hello.exe

I'm not sure if this still applies to newer Delphi versions.

Bart

This example translates Delphi source directly into an executable.
Does anyone have an example of translating/compiling the source for a
simple Delphi program into an intermediate representation before
"linking" the executable?

Thanks,
Eric.
.



Relevant Pages

  • Re: OT: Can you still regiser Delphi 3?
    ...   Delphi does very well in that respect but it's really a code compiler ... and not a database Developer Tool. ... The classes in the supplied VCL give you basic access to database ...
    (alt.comp.lang.borland-delphi)
  • Re: Delphi equivalent of VB6 OLE Object control
    ...   I assume you're talking about accessing OLE/COM objects? ... in VB6 there is a OLE Object control that allows you to see say a ... that I started in VB6 but would like to use Delphi 2007 Pro to ... Can you tell what such a component would be called in Delphi? ...
    (alt.comp.lang.borland-delphi)
  • Re: Obtain property value by name
    ...   Result:= AppointmentItem. ... Select Case Propname ... The Delphi Outlook object model does not expose the ItemProperties ...
    (microsoft.public.outlook.program_vba)
  • Re: Equivalent of Shellexecute in csharp ?
    ... I am using toshiba tec sx8 thermal printer for printing our labels, ... in My old Delphi application I was using such code; ...     ShellExecute(0,'open',Data.cmdbuffer, PChar('/c copy ... There is a Process class you can use. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Is there any way to put Paste Unformatted on the QAT?
    ... but I'd have no idea what to do with that (note that Graham ...  It involves a RibbonXML script to customize the ... I know about Modify in the Customize panel, ...     On Error GoTo Oops ...
    (microsoft.public.word.docmanagement)