Re: Is a modern build system acceptable for older platforms

From: Pavel Golub <pavel(at)microolap(dot)com>
To: Yuriy Zhuravlev <stalkerg(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Darafei Komяpa Praliaskouski <me(at)komzpa(dot)net>, Catalin Iacob <iacobcatalin(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is a modern build system acceptable for older platforms
Date: 2018-05-03 07:50:02
Message-ID: 342450821.20180503105002@gf.microolap.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello, Yuriy.

You wrote:

YZ>  (2) it might make things easier on Windows,
YZ> which could be a sufficiently good reason but I don't think I've seen
YZ> anyone explain exactly how much easier it will make things and in what
YZ> ways.

YZ> 1. You can remove tools/msvc folder because all your build rules
YZ> will be universal. (cmake build now have much fewer lines of code)
YZ> 2. You can forget about terminal in Windows (for windows guys it's important)
YZ> 3. You can normally check environment on Windows, right now we
YZ> have hardcoded headers and many options. Configure process will be same on all platforms.
YZ> 4. You can generate not only GNU Make or MSVC project, you also
YZ> can make Xcode projects, Ninja or NMake for build under MSVC Make.
YZ> For Windows, you also can easily change MSVC to Clang it's not hardcoded at all. 
YZ> 5. With CMake you have an easy way to build extra modules
YZ> (plugins), I have already working prototype for windows PGXS.  A
YZ> plugin should just include .cmake file generated with Postgres build.
YZ> Example:
YZ> https://github.com/stalkerg/postgres_cmake/blob/cmake/contrib/adminpack/CMakeLists.txt
YZ> If PGXS is True it's mean we build module outside postgres.

Cool! Thanks for pointing this out. I just had problems building PG
extensions for Windows. So I switched to MSYS2 and only then I managed
that. No chance for MSVC :(

YZ> But in my opinion, you should just try CMake to figure out all benefits.

>> we can't judge whether they do without a clear explanation of what the gains will be

YZ> I think it's not that thing what easy to explain. Main benefits
YZ> not in unix console area and C language...

--
With best wishes,
Pavel mailto:pavel(at)gf(dot)microolap(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2018-05-03 08:21:28 Anyone keep mirrors of old packages from apt.postgresql.org?
Previous Message Christian Ullrich 2018-05-03 07:11:34 Re: A few warnings on Windows