Build libpq test programs under MSVC
authorAndrew Dunstan <[email protected]>
Sat, 16 Apr 2022 13:35:15 +0000 (09:35 -0400)
committerAndrew Dunstan <[email protected]>
Sat, 16 Apr 2022 13:36:08 +0000 (09:36 -0400)
This allows the newly added TAP tests to run.

src/tools/msvc/Mkvcbuild.pm

index 46904fee0ec3cdd6eb75cb684535618d1a70f84c..fc04e1db8e2569d639edc91b8df9dd1fdb900e82 100644 (file)
@@ -284,6 +284,22 @@ sub mkvcbuild
        $libpqwalreceiver->AddIncludeDir('src/interfaces/libpq');
        $libpqwalreceiver->AddReference($postgres, $libpq);
 
+       my $libpq_testclient =
+         $solution->AddProject('testclient', 'exe', 'misc',
+                                                       'src/interfaces/libpq/test');
+       $libpq_testclient->AddFile('src/interfaces/libpq/test/testclient.c');
+       $libpq_testclient->AddIncludeDir('src/interfaces/libpq');
+       $libpq_testclient->AddReference($libpgport, $libpq);
+       $libpq_testclient->AddLibrary('ws2_32.lib');
+
+       my $libpq_uri_regress =
+         $solution->AddProject('uri-regress', 'exe', 'misc',
+                                                       'src/interfaces/libpq/test');
+       $libpq_uri_regress->AddFile('src/interfaces/libpq/test/uri-regress.c');
+       $libpq_uri_regress->AddIncludeDir('src/interfaces/libpq');
+       $libpq_uri_regress->AddReference($libpgport, $libpq);
+       $libpq_uri_regress->AddLibrary('ws2_32.lib');
+
        my $pgoutput = $solution->AddProject('pgoutput', 'dll', '',
                'src/backend/replication/pgoutput');
        $pgoutput->AddReference($postgres);