Re: Compiling C++ extensions on MSVC using scripts in src/tools

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Compiling C++ extensions on MSVC using scripts in src/tools
Date: 2014-11-26 16:25:31
Message-ID: 5475FEFB.6090401@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 11/25/2014 11:46 PM, Michael Paquier wrote:
> Hi all,
>
> In the stuff I work on in a daily basis there are a couple of
> extensions written in C++, compiling them with MSVC on Windows using
> slightly-different scripts available in src/tools after copying them
> directly in contrib/. However, the build scripts available in
> src/tools/msvc are not able to detect files suffixed as cpp or
> similar. Attached is a two-line patch that enables their detection. I
> believe this would be useful for packagers on Windows.
>

+ unless ($fileNameWithPath =~ /^(.*)\\([^\\]+)\.[r]?[cyl](pp)?$/);

This doesn't seem to me to be terribly well expressed (I know it's not your fault, quite possibly it's mine.) Perhaps we should replace

[r]?[cyl](pp)?

with

(c|cpp|y|l|rc)

which I think is what's intended, and seems much less obscure to me.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-11-26 16:40:09 Re: Compiling C++ extensions on MSVC using scripts in src/tools
Previous Message Tom Lane 2014-11-26 16:19:49 Re: BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON