2007-06-12 13:07:34 +02:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="all">
|
|
|
|
<!--
|
|
|
|
MSBuild project file to build ecpg regression tests
|
|
|
|
-->
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<TESTDIR>..\..\interfaces\ecpg\test</TESTDIR>
|
|
|
|
<CONFIG>Debug</CONFIG>
|
|
|
|
<OUTDIR>..\..\..\..\..\$(CONFIG)\</OUTDIR>
|
|
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(CONFIG)'=='DEBUG'">
|
|
|
|
<!-- set debug runtime library if necessary to be compatible with the LIB files generated -->
|
|
|
|
<DEBUGLIB>d</DEBUGLIB>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<Pgc Include="$(TESTDIR)\**\*.pgc" Exclude="$(TESTDIR)\performance\perftest.pgc"/>
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<OutputToDelete Include="$(TESTDIR)\**\*.exe" />
|
|
|
|
<OutputToDelete Include="$(TESTDIR)\**\*.exe.manifest" />
|
|
|
|
<OutputToDelete Include="$(TESTDIR)\**\*.obj" />
|
|
|
|
<OutputToDelete Include="$(TESTDIR)\**\*.c" Exclude="$(TESTDIR)\pg_regress_ecpg.c;$(TESTDIR)\expected\*.c" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<Target Name="all" Inputs="@(Pgc)" Outputs="%(RelativeDir)%(Filename).exe">
|
|
|
|
<!-- Set special parameters for some tests -->
|
|
|
|
<CreateProperty Value="-C INFORMIX" Condition="'%(Pgc.RelativeDir)'=='$(TESTDIR)\compat_informix\'">
|
|
|
|
<Output TaskParameter="Value" PropertyName="ECPGPARAM" />
|
|
|
|
</CreateProperty>
|
|
|
|
<CreateProperty Value="-C INFORMIX -r no_indicator" Condition="'%(Pgc.FileName)'=='rnull'">
|
|
|
|
<Output TaskParameter="Value" PropertyName="ECPGPARAM" />
|
|
|
|
</CreateProperty>
|
2007-10-03 13:57:36 +02:00
|
|
|
<CreateProperty Value="-c" Condition="'%(Pgc.FileName)'=='array_of_struct'">
|
|
|
|
<Output TaskParameter="Value" PropertyName="ECPGPARAM" />
|
|
|
|
</CreateProperty>
|
2014-04-10 20:37:00 +02:00
|
|
|
<CreateProperty Value="-c" Condition="'%(Pgc.FileName)'=='pointer_to_struct'">
|
|
|
|
<Output TaskParameter="Value" PropertyName="ECPGPARAM" />
|
|
|
|
</CreateProperty>
|
2007-10-03 14:31:18 +02:00
|
|
|
<CreateProperty Value="-r questionmarks" Condition="'%(Pgc.FileName)'=='oldexec'">
|
|
|
|
<Output TaskParameter="Value" PropertyName="ECPGPARAM" />
|
|
|
|
</CreateProperty>
|
|
|
|
<CreateProperty Value="-r prepare" Condition="'%(Pgc.FileName)'=='autoprep'">
|
|
|
|
<Output TaskParameter="Value" PropertyName="ECPGPARAM" />
|
|
|
|
</CreateProperty>
|
2010-03-21 15:26:58 +01:00
|
|
|
<CreateProperty Value="-i" Condition="'%(Pgc.FileName)'=='strings'">
|
|
|
|
<Output TaskParameter="Value" PropertyName="ECPGPARAM" />
|
|
|
|
</CreateProperty>
|
2007-06-12 13:07:34 +02:00
|
|
|
|
|
|
|
<!-- Run ECPG and the Visual C++ compiler on the files. Don't bother with dependency check between the steps -->
|
2007-10-03 13:57:36 +02:00
|
|
|
<Exec WorkingDirectory="%(Pgc.RelativeDir)" Command="$(OUTDIR)ecpg\ecpg -I ../../include --regression $(ECPGPARAM) -o %(Pgc.Filename).c %(Pgc.Filename).pgc" />
|
2017-04-11 21:32:33 +02:00
|
|
|
<Exec WorkingDirectorY="%(Pgc.RelativeDir)" Command="cl /nologo %(Pgc.FileName).c /TC /MD$(DEBUGLIB) /DENABLE_THREAD_SAFETY /DWIN32 /I. /I..\..\include /I..\..\..\libpq /I..\..\..\..\include /link /defaultlib:$(OUTDIR)libecpg\libecpg.lib /defaultlib:$(OUTDIR)libecpg_compat\libecpg_compat.lib /defaultlib:$(OUTDIR)libpgtypes\libpgtypes.lib" />
|
2007-06-12 13:07:34 +02:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<!-- Clean up all output files -->
|
|
|
|
<Target Name="clean">
|
|
|
|
<Delete Files="@(OutputToDelete)" />
|
|
|
|
</Target>
|
|
|
|
</Project>
|