[fpc-pascal] PMake a new build tool

Darius Blaszyk dhkblaszyk at gmail.com
Thu Feb 28 18:09:34 CET 2019


Hi Silvio,

I've looked for something like this to automate the build of some projects
> I'm maintaining, so I have some questions:
>
> Could it build a Delphi-based project too? If so, does it allows to select
> the build for a specific platform/config? (e.g: Win32/Release)
>

By executing 'pmake --compiler <delphi-compiler-path>', it should be easily
possible to build Delphi projects (I don't have Delphi so I cannot test).
The compiler path will be stored in the PMakeLists.txt cache (in the
$(PMAKE_PAS_COMPILER) variable) and used every time again for the build. It
should also be possible to use different compilers by setting the
$(PMAKE_PAS_COMPILER) variable in the PMake script. PMake allows for option
variables to be set in PMake.txt (at any level). See also the PMake project:

option('WITH_DEBUG', 'Enable debug info for PMake', _ON_);

> Could I link the build of an external 3rd party project to automate it
> inside a PMake-based project? For example, supposing I have a C library
> using CMake-based build, could this library be built while (before or
> after) the PMake builds the Pascal project? ( something like CMake's
> ExternalProject_Add() and, optionally, some alternative to
> ExternalProject_Get_Property() )
>

I believe you should use add_custom_command for this. It will create a
package for you that you can add as dependency to a library or executable.
Only after the dependency is resolved, the remaining build will continue.
If you test and have an example, please make a pull request so it can be
added for prosperity.


> I liked it. (y)
>>
> Thanks! Glad you like it. I hope that others find it as useful and easy to
use as me.


> It probably will help me a lot to automate the build of
> interlinked projects simultaneously using two or three commands. :-)
>
The nice thing about PMake is that it also works when pulling together two
different projects using PMake. You only need to use add_directory (and the
correct dependencies of course) to get get a working build.

Rgds, Darius

<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avg.com
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190228/b2d98cc1/attachment.html>


More information about the fpc-pascal mailing list