forked from postgres-plr/plr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
msvc.diff
60 lines (57 loc) · 1.81 KB
/
msvc.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index a184404e21..bedbd93ed2 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -51,7 +51,8 @@ my @contrib_excludes = (
'pgcrypto', 'sepgsql',
'brin', 'test_extensions',
'test_misc', 'test_pg_dump',
- 'snapshot_too_old', 'unsafe_tests');
+ 'snapshot_too_old', 'unsafe_tests',
+ 'plr');
# Set of variables for frontend modules
my $frontend_defines = { 'initdb' => 'FRONTEND' };
@@ -479,6 +480,16 @@ sub mkvcbuild
my $mf = Project::read_file('contrib/pgcrypto/Makefile');
GenerateContribSqlFiles('pgcrypto', $mf);
+ my $plr = $solution->AddProject('plr','dll','plr');
+ $plr->AddFiles(
+ 'contrib\plr','plr.c','pg_conversion.c','pg_backend_support.c','pg_userfuncs.c','pg_rsupport.c'
+ );
+ $plr->AddReference($postgres);
+ $plr->AddLibrary('contrib/plr/R$(PlatformTarget).lib');
+ $plr->AddIncludeDir('$(R_HOME)\include');
+ my $mfplr = Project::read_file('contrib/plr/Makefile');
+ GenerateContribSqlFiles('plr', $mfplr);
+
foreach my $subdir ('contrib', 'src/test/modules')
{
opendir($D, $subdir) || croak "Could not opendir on $subdir!\n";
@@ -1035,6 +1046,15 @@ sub GenerateContribSqlFiles
}
}
}
+ else
+ {
+ print "GenerateContribSqlFiles skipping $n\n";
+ if ($n eq 'plr')
+ {
+ print "mf: $mf\n";
+ }
+ }
+
return;
}
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl
index d9bac6c3a2..25501eeb2d 100644
--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -467,7 +467,7 @@ sub contribcheck
{
chdir "../../../contrib";
my $mstat = 0;
- foreach my $module (glob("*"))
+ foreach my $module (glob("plr"))
{
# these configuration-based exclusions must match Install.pm
next if ($module eq "uuid-ossp" && !defined($config->{uuid}));