Good to hear a positive response! Regarding your questions: What is the state of pascal compilers these days? Are they cross platform? Well GnuPascal is pretty much unsupported nowadays, although some binary distributions still exists, then there are a few close source program and finally there is Freepascal (www.freepascal.org) an opensource compiler written itself in pascal. Gpc and Fpc are indeed crossplatform, checkout the Freepascal home page for the full list of architectures. Hedgewars is using Freepascal to compile on Windows, Linux, Mac (ppc, x86, x86_64), Android and iOS (x86 and arm).
Do they work in the traditional c model of .pas -> .o? Is it more complicated? The compilation process is slightly different but not by much, I found more differences in linking stage. For starters, there are many 'dialects' of Pascal, such as ObjetivePascal, MacPascal, Delphi and a few others, which enable/disable some features of the language (like overloading, records, and return values) but they are usually activated from command line so don't see problems in mapping them in CMake. The compilation process is tricky, two files are generated, a .o file and a .ppu file: the first is a classic object code file, the second is a unit file which is used by the compiler to find and map pascal units; depending on architecture, you can discard the .ppu files. The more complex part (in my opinion) is in the linking stage: on BSD-like system only the .o files are needed, but on windows and linux fpc generates a linker script (with a different syntax on either arch) and then a mixture of internal and external tools to link the executable. For example, for Hedgewars the following scripts are generated: https://dl.dropbox.com/u/24468/hwengine_link_osx.res (osx) https://dl.dropbox.com/u/24468/hwengine_link_lin.res (linux) https://dl.dropbox.com/u/24468/hwengine_link_win.res (windows) and then a script is called to perform the linking operation http://dl.dropbox.com/u/24468/hwengine_ppas_osx.sh http://dl.dropbox.com/u/24468/hwengine_ppas_lin.sh To add it to the mix, on Windows by default an internal linker is used, instead of the system one. Regarding this last part I have no idea how it could be handled by CMake, so I'll leave the analysis to someone with more experience. If you want to see this in action, you can try compiling Hedgewars, here are the instructions: http://code.google.com/p/hedgewars/wiki/BuildingHedgewars Returning to the Summer of Code, do you think this kind of work is suitable for a student in a summer work? Or it's too complex/too easy? Eventually will the code produced be integrated in CMake? Cheers, Vittorio On Mon, Feb 11, 2013 at 4:03 PM, Bill Hoffman <[email protected]>wrote: > On 2/8/2013 8:55 PM, Vittorio Giovara wrote: > >> Hi all, >> I'm one of the developer of Hedgewars, an open source video game written >> in c++ and Pascal, using CMake as build system. Please see the full site >> at http://www.hedgewars.org/ >> >> Right now our pascal integration is a little hack-y, >> http://code.google.com/p/**hedgewars/source/browse/** >> hedgewars/CMakeLists.txt<http://code.google.com/p/hedgewars/source/browse/hedgewars/CMakeLists.txt>as >> we just add many 'custom_command' and 'custom_target' all around the >> place. This has caused issues on many many platforms, especially at the >> linking stage. >> >> I was wondering whether it would it be possible to have the Pascal >> language as one "officially" supported languages, so that it'd be >> possible to write add_sources() on the .pas files and live happily ever >> after. >> >> >> If so, I think we could make this work thanks to the Google Summer of >> Code! This program (*if* they announce it) basically introduces students >> to the world of FOSS development by having them work on a project for an >> open source organization during the summer. >> >> I don't know if CMake wants to participate this year, but in case not, >> if there is one developer willing to act as mentor for a student, >> Hedgewars (*if* selected) would happily allocate one of its students to >> work on this task and act as a "umbrella" for this single project >> targeting CMake sources. Of course the student would still have to write >> a sensible project proposal for being accepted. >> >> >> What do you think of this idea? >> Cheers, >> Vittorio (koda on #hedgewars) >> > > Sounds cool to me. What is the state of pascal compilers these days? Are > they cross platform? Do they work in the traditional c model of .pas -> > .o? Is it more complicated? > > -Bill > > > -- > Bill Hoffman > Kitware, Inc. > 28 Corporate Drive > Clifton Park, NY 12065 > [email protected] > http://www.kitware.com > 518 881-4905 (Direct) > 518 371-3971 x105 > Fax (518) 371-4573 > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at http://www.kitware.com/** > opensource/opensource.html<http://www.kitware.com/opensource/opensource.html> > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ> > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/cgi-**bin/mailman/listinfo/cmake-**developers<http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers> >
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
