Correct a configuration error when tests on Windows are built in debug mode
This commit is contained in:
parent
7034a48ad9
commit
f6d14fd37e
@ -6,8 +6,7 @@ for /f "tokens=1,2,3,4" %%a in (..\lastbuild.txt) do ((set tpe=%%a) & (set plf=%
|
||||
if /i "%plf%" EQU "" (call :seterr & echo ERROR: 'mpir-tests\lastbuild.txt' not found & exit /b %errorlevel%)
|
||||
echo %odir%"
|
||||
set in_tpe=
|
||||
fc ..\lib-test-config.props ..\test-config.props > nul && ((set in_tpe=lib) & goto cont)
|
||||
fc ..\dll-test-config.props ..\test-config.props > nul && ((set in_tpe=dll) & goto cont)
|
||||
fc ..\%tpe%-%cnf%-config.props ..\test-config.props > nul && ((set in_tpe=%tpe%) & goto cont)
|
||||
call :seterr & echo ERROR: cannot determine library type (static or DLL) to test & exit /b %errorlevel%
|
||||
|
||||
:cont
|
||||
@ -15,7 +14,7 @@ call :no_spc in_plf, %1
|
||||
call :no_spc in_cnf, %2
|
||||
|
||||
if "%tpe%" EQU "lib" if not exist ..\..\%odir%\mpirxx.lib (call :seterr & echo ERROR: static library tests need 'mpirxx.lib' & exit /b %errorlevel%)
|
||||
if "%in_plf%" EQU "%plf%" if "%in_cnf%" EQU "%cnf%" if "%in_tpe%" EQU "%tpe%" echo OK & exit /b 0
|
||||
if /i "%in_plf%" EQU "%plf%" if /i "%in_cnf%" EQU "%cnf%" if /i "%in_tpe%" EQU "%tpe%" echo OK & exit /b 0
|
||||
|
||||
call :seterr
|
||||
echo ERROR Last MPIR build was %tpe%\%plf%\%cnf%, not %in_tpe%\%in_plf%\%in_cnf%
|
||||
|
31
build.vc10/mpir-tests/dll-debug-config.props
Normal file
31
build.vc10/mpir-tests/dll-debug-config.props
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<MPLIBS>$(SolutionDir)dll\$(Platform)\$(Configuration)\mpir.lib</MPLIBS>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
|
||||
<OutDir>$(SolutionDir)$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformName)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)..\;$(SolutionDir)..\tests</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>__GMP_LIBGMP_DLL</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(MPLIBS);$(OutDir)\add-test-lib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>if exist $(Bindir)$(OutDir)gmp-mparam.h (copy $(Bindir)$(OutDir)gmp-mparam.h ..\..\..\) else (echo $(Bindir)$(OutDir)gmp-mparam.h is not present )</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<BuildMacro Include="MPLIBS">
|
||||
<Value>$(MPLIBS)</Value>
|
||||
<EnvironmentVariable>true</EnvironmentVariable>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
30
build.vc10/mpir-tests/lib-debug-config.props
Normal file
30
build.vc10/mpir-tests/lib-debug-config.props
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="UserMacros">
|
||||
<MPLIBS>$(SolutionDir)lib\$(Platform)\$(Configuration)\mpir.lib;$(SolutionDir)lib\$(Platform)\$(Configuration)\mpirxx.lib</MPLIBS>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.21006.1</_ProjectFileVersion>
|
||||
<OutDir>$(SolutionDir)$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformName)\$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)..\;$(SolutionDir)..\tests</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(MPLIBS);$(OutDir)\add-test-lib.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>if exist $(Bindir)$(OutDir)gmp-mparam.h (copy $(Bindir)$(OutDir)gmp-mparam.h ..\..\..\) else (echo $(Bindir)$(OutDir)gmp-mparam.h is not present )</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<BuildMacro Include="MPLIBS">
|
||||
<Value>$(MPLIBS)</Value>
|
||||
<EnvironmentVariable>true</EnvironmentVariable>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -24,11 +24,11 @@ if "%extn%" EQU "dll" (
|
||||
copy %tdir%\mpir.exp %odir%\mpir.exp
|
||||
copy %tdir%\mpir.lib %odir%\mpir.lib
|
||||
if exist %tdir%\mpir.pdb (copy %tdir%\mpir.pdb %odir%\mpir.pdb)
|
||||
copy mpir-tests\dll-test-config.props mpir-tests\test-config.props
|
||||
copy mpir-tests\%extn%-%cnf%-config.props mpir-tests\test-config.props
|
||||
) else if "%extn%" EQU "lib" (
|
||||
copy %tdir%\mpir.lib %odir%\mpir.lib
|
||||
if exist %tdir%\mpir.pdb (copy %tdir%\mpir.pdb %odir%\mpir.pdb)
|
||||
copy mpir-tests\lib-test-config.props mpir-tests\test-config.props
|
||||
copy mpir-tests\%extn%-%cnf%-config.props mpir-tests\test-config.props
|
||||
) else (
|
||||
call :seterr & echo ERROR: illegal library type %extn% & exit /b %errorlevel%
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user