mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
When using MSVC, disable the building of ecpg if pthreads is not
specified. Magnus Hagander
This commit is contained in:
@ -367,11 +367,13 @@ sub WriteConfiguration
|
|||||||
}
|
}
|
||||||
$libs =~ s/ $//;
|
$libs =~ s/ $//;
|
||||||
$libs =~ s/__CFGNAME__/$cfgname/g;
|
$libs =~ s/__CFGNAME__/$cfgname/g;
|
||||||
|
my $pth = $self->{solution}->{options}->{pthread};
|
||||||
|
$pth = '' unless $pth;
|
||||||
print $f <<EOF;
|
print $f <<EOF;
|
||||||
<Configuration Name="$cfgname|Win32" OutputDirectory=".\\$cfgname\\$self->{name}" IntermediateDirectory=".\\$cfgname\\$self->{name}"
|
<Configuration Name="$cfgname|Win32" OutputDirectory=".\\$cfgname\\$self->{name}" IntermediateDirectory=".\\$cfgname\\$self->{name}"
|
||||||
ConfigurationType="$cfgtype" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2" WholeProgramOptimization="$p->{wholeopt}">
|
ConfigurationType="$cfgtype" UseOfMFC="0" ATLMinimizesCRunTimeLibraryUsage="FALSE" CharacterSet="2" WholeProgramOptimization="$p->{wholeopt}">
|
||||||
<Tool Name="VCCLCompilerTool" Optimization="$p->{opt}"
|
<Tool Name="VCCLCompilerTool" Optimization="$p->{opt}"
|
||||||
AdditionalIncludeDirectories="src/include;src/include/port/win32;src/include/port/win32_msvc;$self->{solution}->{options}->{pthread};$self->{includes}"
|
AdditionalIncludeDirectories="src/include;src/include/port/win32;src/include/port/win32_msvc;$pth;$self->{includes}"
|
||||||
PreprocessorDefinitions="WIN32;_WINDOWS;__WINDOWS__;__WIN32__;EXEC_BACKEND;WIN32_STACK_RLIMIT=4194304;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE$self->{defines}$p->{defs}"
|
PreprocessorDefinitions="WIN32;_WINDOWS;__WINDOWS__;__WIN32__;EXEC_BACKEND;WIN32_STACK_RLIMIT=4194304;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE$self->{defines}$p->{defs}"
|
||||||
StringPooling="$p->{strpool}"
|
StringPooling="$p->{strpool}"
|
||||||
RuntimeLibrary="$p->{runtime}" DisableSpecificWarnings="$self->{disablewarnings}"
|
RuntimeLibrary="$p->{runtime}" DisableSpecificWarnings="$self->{disablewarnings}"
|
||||||
|
@ -6,7 +6,6 @@ use warnings;
|
|||||||
sub new {
|
sub new {
|
||||||
my $junk = shift;
|
my $junk = shift;
|
||||||
my $options = shift;
|
my $options = shift;
|
||||||
die "Pthreads is required.\n" unless $options->{pthread};
|
|
||||||
my $self = {
|
my $self = {
|
||||||
projects => {},
|
projects => {},
|
||||||
options => $options,
|
options => $options,
|
||||||
|
@ -90,28 +90,33 @@ $pgtypes->AddDefine('FRONTEND');
|
|||||||
$pgtypes->AddReference($postgres,$libpgport);
|
$pgtypes->AddReference($postgres,$libpgport);
|
||||||
$pgtypes->AddIncludeDir('src\interfaces\ecpg\include');
|
$pgtypes->AddIncludeDir('src\interfaces\ecpg\include');
|
||||||
|
|
||||||
my $libecpg = $solution->AddProject('libecpg','dll','interfaces','src\interfaces\ecpg\ecpglib');
|
if ($config->{pthread}) {
|
||||||
$libecpg->AddDefine('FRONTEND');
|
my $libecpg = $solution->AddProject('libecpg','dll','interfaces','src\interfaces\ecpg\ecpglib');
|
||||||
$libecpg->AddIncludeDir('src\interfaces\ecpg\include');
|
$libecpg->AddDefine('FRONTEND');
|
||||||
$libecpg->AddIncludeDir('src\interfaces\libpq');
|
$libecpg->AddIncludeDir('src\interfaces\ecpg\include');
|
||||||
$libecpg->AddIncludeDir('src\port');
|
$libecpg->AddIncludeDir('src\interfaces\libpq');
|
||||||
$libecpg->AddLibrary('wsock32.lib');
|
$libecpg->AddIncludeDir('src\port');
|
||||||
$libecpg->AddLibrary($config->{'pthread'} . '\pthreadVC2.lib');
|
$libecpg->AddLibrary('wsock32.lib');
|
||||||
$libecpg->AddReference($libpq,$pgtypes);
|
$libecpg->AddLibrary($config->{'pthread'} . '\pthreadVC2.lib');
|
||||||
|
$libecpg->AddReference($libpq,$pgtypes);
|
||||||
|
|
||||||
my $libecpgcompat = $solution->AddProject('libecpg_compat','dll','interfaces','src\interfaces\ecpg\compatlib');
|
my $libecpgcompat = $solution->AddProject('libecpg_compat','dll','interfaces','src\interfaces\ecpg\compatlib');
|
||||||
$libecpgcompat->AddIncludeDir('src\interfaces\ecpg\include');
|
$libecpgcompat->AddIncludeDir('src\interfaces\ecpg\include');
|
||||||
$libecpgcompat->AddIncludeDir('src\interfaces\libpq');
|
$libecpgcompat->AddIncludeDir('src\interfaces\libpq');
|
||||||
$libecpgcompat->AddReference($pgtypes,$libecpg);
|
$libecpgcompat->AddReference($pgtypes,$libecpg);
|
||||||
|
|
||||||
my $ecpg = $solution->AddProject('ecpg','exe','interfaces','src\interfaces\ecpg\preproc');
|
my $ecpg = $solution->AddProject('ecpg','exe','interfaces','src\interfaces\ecpg\preproc');
|
||||||
$ecpg->AddIncludeDir('src\interfaces\ecpg\include');
|
$ecpg->AddIncludeDir('src\interfaces\ecpg\include');
|
||||||
$ecpg->AddIncludeDir('src\interfaces\libpq');
|
$ecpg->AddIncludeDir('src\interfaces\libpq');
|
||||||
$ecpg->AddFiles('src\interfaces\ecpg\preproc','pgc.l','preproc.y');
|
$ecpg->AddFiles('src\interfaces\ecpg\preproc','pgc.l','preproc.y');
|
||||||
$ecpg->AddDefine('MAJOR_VERSION=4');
|
$ecpg->AddDefine('MAJOR_VERSION=4');
|
||||||
$ecpg->AddDefine('MINOR_VERSION=2');
|
$ecpg->AddDefine('MINOR_VERSION=2');
|
||||||
$ecpg->AddDefine('PATCHLEVEL=1');
|
$ecpg->AddDefine('PATCHLEVEL=1');
|
||||||
$ecpg->AddReference($libpgport);
|
$ecpg->AddReference($libpgport);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print "Not building ecpg due to lack of pthreads.\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# src/bin
|
# src/bin
|
||||||
|
Reference in New Issue
Block a user