Delphi language support in CMake build system



Cross-posted from CMake's mailing list <http://www.cmake.org/pipermail/
cmake/2008-October/024670.html> so that Delphi experts might possibly
answer the "intermediate translation" problem below:

Alan W. Irwin wrote:
On 2008-10-16 18:08-0600 Eric (Brad) Lemings wrote:


Where can I find info/tutorials on adding support for new languages to
CMake?

The following is pretty minimal, but I think this is all there is at the
moment.

Look at Modules/CMakeAddNewLanguage.txt in the CMake source tree. Pick a
language you are familiar with and uses its support files in Modules and
Modules/Platform as a template for your own work. You may also want to
look
at the CMake source code to confirm how CMake interacts with those
various
language support files. Ask for help on this mailing list when you run
into some difficulty.

Delphi, as I've just discovered, is quite different from the familiar
C/C++ compile/link phases assumed by CMake. For example, different
types of Delphi source files produce different types of output files
as shown below:

C:\Temp>dir /b
a.pas
b.pas
c.pas
d.dpr

C:\Temp>type a.pas
package A;
end.
C:\Temp>type b.pas
library B;
begin
end.
C:\Temp>type c.pas
unit C;
interface
implementation
end.
C:\Temp>type d.dpr
program D;
begin
end.
C:\Temp>dcc32 a.pas b.pas c.pas d.dpr
CodeGear Delphi for Win32 compiler version 18.5
Copyright (c) 1983,2007 CodeGear
a.pas(2)
b.pas(3)
c.pas(4)
d.dpr(3)
16 lines, 0.14 seconds, 10980 bytes code, 12152 bytes data.

C:\Temp>dir /b
a.bpl
A.dcp
a.dcu
a.pas
b.dll
b.pas
c.dcu
c.exe
c.pas
d.dpr
d.exe

In particular, I know of no way to translate a Delphi program into an
intermediate form before linking the executable. (I'll readily admit
to knowing very little about Delphi though.) So I'm not sure how to
make CMake aware of this.

Tackling the problem from a different angle, Delphi's native build
system is based on MSBuild. Is there a CMake generator for MSBuild?
If there is, Delphi/CMake developers could leverage the existing
project/build files.

Thanks,
Eric.
.



Relevant Pages

  • Re: Definition of outdated...
    ... There are often a reference to a programming language to be ... user) economical reasons that is the reason for them. ... I also hate hypes and you can call me as Delphi fan ... no multiplatform support ...
    (borland.public.delphi.non-technical)
  • Re: Chrome - competition for Borland?
    ... Ultimately the goal would be to have everything in a single language, ... in a single IDE, and Chrome would be a stepping stone to that goal ... Delphi would be for legacy, but for that task, there is already D7. ... basic Windowing support and native compilation in some areas (latest batch ...
    (borland.public.delphi.non-technical)
  • Re: How to develop for Linux
    ... Delphi was always one of my favorite Windows only tools. ... support and do not expect there to be a wide world of support out there. ... C++, the language, is supported on all platforms and controlled by no single ... Java and .NET: slow is slow. ...
    (borland.public.delphi.non-technical)
  • Re: X-Plataform, again
    ... Delphi into a language with advanced features that would still support the ... about the VCL and the language, but where its identity comes from is its GUI goodness and superior native windows support. ... possible FFI to access our existing codebase. ...
    (borland.public.delphi.non-technical)
  • Re: Productivity in Delphi vs. Java/JSP
    ... I mixed up your statements somehow with multiple language ... support, but you were instead only talking about Win32 and .Net capabilities ... that Delphi is and will be still one of the Borland ... > absolutely the best Win32 tool ever, I don't need much more proofs. ...
    (borland.public.delphi.non-technical)