Extension using Meson as build system

Started by Junwang Zhaoover 1 year ago9 messages
#1Junwang Zhao
zhjwpku@gmail.com

Hi hackers,

Is there any extension that uses meson as build systems?
I'm starting a extension project that written in c++, cmake is my
initial choice as the build system, but since PostgreSQL has adopted
Meson, so I'm wondering if there is any extension that also uses
meson that I can reference.

--
Regards
Junwang Zhao

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Junwang Zhao (#1)
Re: Extension using Meson as build system

Hi

ne 30. 6. 2024 v 15:17 odesílatel Junwang Zhao <zhjwpku@gmail.com> napsal:

Hi hackers,

Is there any extension that uses meson as build systems?
I'm starting a extension project that written in c++, cmake is my
initial choice as the build system, but since PostgreSQL has adopted
Meson, so I'm wondering if there is any extension that also uses
meson that I can reference.

any extension from contrib package

https://github.com/postgres/postgres/tree/master/contrib

probably only these

Regards

Pavel

Show quoted text

--
Regards
Junwang Zhao

#3Junwang Zhao
zhjwpku@gmail.com
In reply to: Pavel Stehule (#2)
Re: Extension using Meson as build system

On Sun, Jun 30, 2024 at 9:20 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:

Hi

ne 30. 6. 2024 v 15:17 odesílatel Junwang Zhao <zhjwpku@gmail.com> napsal:

Hi hackers,

Is there any extension that uses meson as build systems?
I'm starting a extension project that written in c++, cmake is my
initial choice as the build system, but since PostgreSQL has adopted
Meson, so I'm wondering if there is any extension that also uses
meson that I can reference.

any extension from contrib package

Ah, yeah, but I'm not sure these extensions have any dependencies
on the main project? Never mind, I'll take a look, thanks.

https://github.com/postgres/postgres/tree/master/contrib

probably only these

Regards

Pavel

--
Regards
Junwang Zhao

--
Regards
Junwang Zhao

#4Pavel Stehule
pavel.stehule@gmail.com
In reply to: Junwang Zhao (#3)
Re: Extension using Meson as build system

ne 30. 6. 2024 v 15:28 odesílatel Junwang Zhao <zhjwpku@gmail.com> napsal:

On Sun, Jun 30, 2024 at 9:20 PM Pavel Stehule <pavel.stehule@gmail.com>
wrote:

Hi

ne 30. 6. 2024 v 15:17 odesílatel Junwang Zhao <zhjwpku@gmail.com>

napsal:

Hi hackers,

Is there any extension that uses meson as build systems?
I'm starting a extension project that written in c++, cmake is my
initial choice as the build system, but since PostgreSQL has adopted
Meson, so I'm wondering if there is any extension that also uses
meson that I can reference.

any extension from contrib package

Ah, yeah, but I'm not sure these extensions have any dependencies
on the main project? Never mind, I'll take a look, thanks.

any postgres extension has dependency on main project

what can be different - if the extension is build inside or outside source
code tree

Show quoted text

https://github.com/postgres/postgres/tree/master/contrib

probably only these

Regards

Pavel

--
Regards
Junwang Zhao

--
Regards
Junwang Zhao

#5Junwang Zhao
zhjwpku@gmail.com
In reply to: Pavel Stehule (#4)
Re: Extension using Meson as build system

On Sun, Jun 30, 2024 at 9:31 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:

ne 30. 6. 2024 v 15:28 odesílatel Junwang Zhao <zhjwpku@gmail.com> napsal:

On Sun, Jun 30, 2024 at 9:20 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:

Hi

ne 30. 6. 2024 v 15:17 odesílatel Junwang Zhao <zhjwpku@gmail.com> napsal:

Hi hackers,

Is there any extension that uses meson as build systems?
I'm starting a extension project that written in c++, cmake is my
initial choice as the build system, but since PostgreSQL has adopted
Meson, so I'm wondering if there is any extension that also uses
meson that I can reference.

any extension from contrib package

Ah, yeah, but I'm not sure these extensions have any dependencies
on the main project? Never mind, I'll take a look, thanks.

any postgres extension has dependency on main project

what can be different - if the extension is build inside or outside source code tree

Take contrib/ltree as an example, in Makefile, there are some lines:

ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/ltree
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

I am taking these as the reason that extension can build outside of postgres
source code, but I can't find an equivalent in meson.build.

https://github.com/postgres/postgres/tree/master/contrib

probably only these

Regards

Pavel

--
Regards
Junwang Zhao

--
Regards
Junwang Zhao

--
Regards
Junwang Zhao

#6Pavel Stehule
pavel.stehule@gmail.com
In reply to: Junwang Zhao (#5)
Re: Extension using Meson as build system

ne 30. 6. 2024 v 15:39 odesílatel Junwang Zhao <zhjwpku@gmail.com> napsal:

On Sun, Jun 30, 2024 at 9:31 PM Pavel Stehule <pavel.stehule@gmail.com>
wrote:

ne 30. 6. 2024 v 15:28 odesílatel Junwang Zhao <zhjwpku@gmail.com>

napsal:

On Sun, Jun 30, 2024 at 9:20 PM Pavel Stehule <pavel.stehule@gmail.com>

wrote:

Hi

ne 30. 6. 2024 v 15:17 odesílatel Junwang Zhao <zhjwpku@gmail.com>

napsal:

Hi hackers,

Is there any extension that uses meson as build systems?
I'm starting a extension project that written in c++, cmake is my
initial choice as the build system, but since PostgreSQL has adopted
Meson, so I'm wondering if there is any extension that also uses
meson that I can reference.

any extension from contrib package

Ah, yeah, but I'm not sure these extensions have any dependencies
on the main project? Never mind, I'll take a look, thanks.

any postgres extension has dependency on main project

what can be different - if the extension is build inside or outside

source code tree

Take contrib/ltree as an example, in Makefile, there are some lines:

ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/ltree
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

I am taking these as the reason that extension can build outside of
postgres
source code, but I can't find an equivalent in meson.build.

probably nobody did it yet

Show quoted text

https://github.com/postgres/postgres/tree/master/contrib

probably only these

Regards

Pavel

--
Regards
Junwang Zhao

--
Regards
Junwang Zhao

--
Regards
Junwang Zhao

#7Peter Eisentraut
peter@eisentraut.org
In reply to: Junwang Zhao (#1)
Re: Extension using Meson as build system

On 30.06.24 15:17, Junwang Zhao wrote:

Is there any extension that uses meson as build systems?
I'm starting a extension project that written in c++, cmake is my
initial choice as the build system, but since PostgreSQL has adopted
Meson, so I'm wondering if there is any extension that also uses
meson that I can reference.

I wrote a little demo:

https://github.com/petere/plsh/blob/meson/meson.build

#8Junwang Zhao
zhjwpku@gmail.com
In reply to: Peter Eisentraut (#7)
Re: Extension using Meson as build system

Hi, Peter

On Fri, Jul 26, 2024 at 11:06 PM Peter Eisentraut <peter@eisentraut.org> wrote:

On 30.06.24 15:17, Junwang Zhao wrote:

Is there any extension that uses meson as build systems?
I'm starting a extension project that written in c++, cmake is my
initial choice as the build system, but since PostgreSQL has adopted
Meson, so I'm wondering if there is any extension that also uses
meson that I can reference.

I wrote a little demo:

https://github.com/petere/plsh/blob/meson/meson.build

Thanks, I will check it out ;)

--
Regards
Junwang Zhao

#9Andrew Dunstan
andrew@dunslane.net
In reply to: Peter Eisentraut (#7)
Re: Extension using Meson as build system

On 2024-07-26 Fr 11:06 AM, Peter Eisentraut wrote:

On 30.06.24 15:17, Junwang Zhao wrote:

Is there any extension that uses meson as build systems?
I'm starting a extension project that written in c++, cmake is my
initial choice as the build system, but since PostgreSQL has adopted
Meson, so I'm wondering if there is any extension that also uses
meson that I can reference.

I wrote a little demo:

https://github.com/petere/plsh/blob/meson/meson.build

nifty!

cheers

andew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com