2 <Project xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets=
"all">
4 MSBuild project file to build ecpg regression tests
8 <TESTDIR>..\..\interfaces\ecpg\test
</TESTDIR>
10 <OUTDIR>..\..\..\..\..\$(CONFIG)\
</OUTDIR>
12 <PropertyGroup Condition=
"'$(CONFIG)'=='DEBUG'">
13 <!-- set debug runtime library if necessary to be compatible with the LIB files generated -->
14 <DEBUGLIB>d
</DEBUGLIB>
18 <Pgc Include=
"$(TESTDIR)\**\*.pgc" Exclude=
"$(TESTDIR)\performance\perftest.pgc"/>
22 <OutputToDelete Include=
"$(TESTDIR)\**\*.exe" />
23 <OutputToDelete Include=
"$(TESTDIR)\**\*.exe.manifest" />
24 <OutputToDelete Include=
"$(TESTDIR)\**\*.obj" />
25 <OutputToDelete Include=
"$(TESTDIR)\**\*.c" Exclude=
"$(TESTDIR)\pg_regress_ecpg.c;$(TESTDIR)\expected\*.c" />
28 <Target Name=
"all" Inputs=
"@(Pgc)" Outputs=
"%(RelativeDir)%(Filename).exe">
29 <!-- Set special parameters for some tests -->
30 <CreateProperty Value=
"-C INFORMIX" Condition=
"'%(Pgc.RelativeDir)'=='$(TESTDIR)\compat_informix\'">
31 <Output TaskParameter=
"Value" PropertyName=
"ECPGPARAM" />
33 <CreateProperty Value=
"-C INFORMIX -r no_indicator" Condition=
"'%(Pgc.FileName)'=='rnull'">
34 <Output TaskParameter=
"Value" PropertyName=
"ECPGPARAM" />
36 <CreateProperty Value=
"-c" Condition=
"'%(Pgc.FileName)'=='array_of_struct'">
37 <Output TaskParameter=
"Value" PropertyName=
"ECPGPARAM" />
39 <CreateProperty Value=
"-r questionmarks" Condition=
"'%(Pgc.FileName)'=='oldexec'">
40 <Output TaskParameter=
"Value" PropertyName=
"ECPGPARAM" />
42 <CreateProperty Value=
"-r prepare" Condition=
"'%(Pgc.FileName)'=='autoprep'">
43 <Output TaskParameter=
"Value" PropertyName=
"ECPGPARAM" />
46 <!-- Run ECPG and the Visual C++ compiler on the files. Don't bother with dependency check between the steps -->
47 <Exec WorkingDirectory=
"%(Pgc.RelativeDir)" Command=
"$(OUTDIR)ecpg\ecpg -I ../../include --regression $(ECPGPARAM) -o %(Pgc.Filename).c %(Pgc.Filename).pgc" />
48 <Exec WorkingDirectorY=
"%(Pgc.RelativeDir)" Command=
"cl /nologo %(Pgc.FileName).c /TC /MD$(DEBUGLIB) /DENABLE_THREAD_SAFETY /DWIN32 /DWIN32_ONLY_COMPILER /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" />
51 <!-- Clean up all output files -->
53 <Delete Files=
"@(OutputToDelete)" />