60a0ce6f98
# Conflicts: # msvc/_msvc_filters.py # msvc/_msvc_project.py # msvc/_msvc_solution.py # msvc/cfg.h # msvc/check_config.bat # msvc/g2y.py # msvc/gen_config_h.bat # msvc/gen_mpir_h.bat # msvc/gen_test_config_props.bat # msvc/getopt.c # msvc/getopt.h # msvc/getrusage.c # msvc/getrusage.h # msvc/gettimeofday.c # msvc/gettimeofday.h # msvc/mpir_config.py # msvc/mpir_config.pyproj # msvc/mpir_config.sln # msvc/mpir_debug_dll.props # msvc/mpir_debug_lib.props # msvc/mpir_release_dll.props # msvc/mpir_release_lib.props # msvc/obsolete.c # msvc/out_copy_rename.bat # msvc/postbuild.bat # msvc/prebuild.bat # msvc/run-tests.py # msvc/unistd.h # msvc/vs13/dll_mpir_gc/dll_mpir_gc.vcxproj.filters # msvc/vs13/lib_mpir_cxx/lib_mpir_cxx.vcxproj # msvc/vs13/lib_mpir_cxx/lib_mpir_cxx.vcxproj.filters # msvc/vs13/lib_mpir_gc/lib_mpir_gc.vcxproj.filters # msvc/vs13/mpir-tests.sln # msvc/vs13/mpir-tune.sln # msvc/vs13/msbuild.bat # msvc/vs13/run-speed.py # msvc/vs13/run-tests.py # msvc/vs13/version_info.py # msvc/vs17/dll_mpir_gc/dll_mpir_gc.vcxproj.filters # msvc/vs17/lib_mpir_cxx/lib_mpir_cxx.vcxproj # msvc/vs17/lib_mpir_cxx/lib_mpir_cxx.vcxproj.filters # msvc/vs17/lib_mpir_gc/lib_mpir_gc.vcxproj.filters # msvc/vs17/mpir-tests.sln # msvc/vs17/mpir-tests/add-test-lib/add-test-lib.vcxproj # msvc/vs17/mpir-tests/add-test-lib/add-test-lib.vcxproj.filters # msvc/vs17/mpir-tests/cxx.assign/cxx.assign.vcxproj # msvc/vs17/mpir-tests/cxx.binary/cxx.binary.vcxproj # msvc/vs17/mpir-tests/cxx.cast/cxx.cast.vcxproj # msvc/vs17/mpir-tests/cxx.constr/cxx.constr.vcxproj # msvc/vs17/mpir-tests/cxx.istream/cxx.istream.vcxproj # msvc/vs17/mpir-tests/f.adjust/f.adjust.vcxproj # msvc/vs17/mpir-tests/f.adjust_sqrt2/f.adjust_sqrt2.vcxproj # msvc/vs17/mpir-tests/f.butterfly/f.butterfly.vcxproj # msvc/vs17/mpir-tests/f.butterfly_lshb/f.butterfly_lshb.vcxproj # msvc/vs17/mpir-tests/f.butterfly_rshb/f.butterfly_rshb.vcxproj # msvc/vs17/mpir-tests/f.butterfly_sqrt2/f.butterfly_sqrt2.vcxproj # msvc/vs17/mpir-tests/f.butterfly_twiddle/f.butterfly_twiddle.vcxproj # msvc/vs17/mpir-tests/f.div_2expmod_2expp1/f.div_2expmod_2expp1.vcxproj # msvc/vs17/mpir-tests/f.fft_ifft_mfa_trunc_sqrt2/f.fft_ifft_mfa_trunc_sqrt2.vcxproj # msvc/vs17/mpir-tests/f.fft_ifft_negacyclic/f.fft_ifft_negacyclic.vcxproj # msvc/vs17/mpir-tests/f.fft_ifft_radix2/f.fft_ifft_radix2.vcxproj # msvc/vs17/mpir-tests/f.fft_ifft_trunc/f.fft_ifft_trunc.vcxproj # msvc/vs17/mpir-tests/f.fft_ifft_trunc_sqrt2/f.fft_ifft_trunc_sqrt2.vcxproj # msvc/vs17/mpir-tests/f.mul_2expmod_2expp1/f.mul_2expmod_2expp1.vcxproj # msvc/vs17/mpir-tests/f.mul_fft_main/f.mul_fft_main.vcxproj # msvc/vs17/mpir-tests/f.mul_mfa_trunc_sqrt2/f.mul_mfa_trunc_sqrt2.vcxproj # msvc/vs17/mpir-tests/f.mul_trunc_sqrt2/f.mul_trunc_sqrt2.vcxproj # msvc/vs17/mpir-tests/f.mulmod_2expp1/f.mulmod_2expp1.vcxproj # msvc/vs17/mpir-tests/f.normmod_2expp1/f.normmod_2expp1.vcxproj # msvc/vs17/mpir-tests/f.split_combine_bits/f.split_combine_bits.vcxproj # msvc/vs17/mpir-tests/misc.printf/misc.printf.vcxproj # msvc/vs17/mpir-tests/misc.scanf/misc.scanf.vcxproj # msvc/vs17/mpir-tests/mpf.add/mpf.add.vcxproj # msvc/vs17/mpir-tests/mpf.cmp_d/mpf.cmp_d.vcxproj # msvc/vs17/mpir-tests/mpf.cmp_si/mpf.cmp_si.vcxproj # msvc/vs17/mpir-tests/mpf.conv/mpf.conv.vcxproj # msvc/vs17/mpir-tests/mpf.div/mpf.div.vcxproj # msvc/vs17/mpir-tests/mpf.dm2exp/mpf.dm2exp.vcxproj # msvc/vs17/mpir-tests/mpf.eq/mpf.eq.vcxproj # msvc/vs17/mpir-tests/mpf.fits/mpf.fits.vcxproj # msvc/vs17/mpir-tests/mpf.get_d/mpf.get_d.vcxproj # msvc/vs17/mpir-tests/mpf.get_d_2exp/mpf.get_d_2exp.vcxproj # msvc/vs17/mpir-tests/mpf.get_si/mpf.get_si.vcxproj # msvc/vs17/mpir-tests/mpf.get_ui/mpf.get_ui.vcxproj # msvc/vs17/mpir-tests/mpf.gsprec/mpf.gsprec.vcxproj # msvc/vs17/mpir-tests/mpf.inp_str/mpf.inp_str.vcxproj # msvc/vs17/mpir-tests/mpf.int_p/mpf.int_p.vcxproj # msvc/vs17/mpir-tests/mpf.mul_ui/mpf.mul_ui.vcxproj # msvc/vs17/mpir-tests/mpf.muldiv/mpf.muldiv.vcxproj # msvc/vs17/mpir-tests/mpf.reuse/mpf.reuse.vcxproj # msvc/vs17/mpir-tests/mpf.set/mpf.set.vcxproj # msvc/vs17/mpir-tests/mpf.set_q/mpf.set_q.vcxproj # msvc/vs17/mpir-tests/mpf.set_si/mpf.set_si.vcxproj # msvc/vs17/mpir-tests/mpf.set_ui/mpf.set_ui.vcxproj # msvc/vs17/mpir-tests/mpf.sqrt/mpf.sqrt.vcxproj # msvc/vs17/mpir-tests/mpf.sqrt_ui/mpf.sqrt_ui.vcxproj # msvc/vs17/mpir-tests/mpf.sub/mpf.sub.vcxproj # msvc/vs17/mpir-tests/mpf.trunc/mpf.trunc.vcxproj # msvc/vs17/mpir-tests/mpf.ui_div/mpf.ui_div.vcxproj # msvc/vs17/mpir-tests/mpn.addadd_n/mpn.addadd_n.vcxproj # msvc/vs17/mpir-tests/mpn.addsub_n/mpn.addsub_n.vcxproj # msvc/vs17/mpir-tests/mpn.aors_1/mpn.aors_1.vcxproj # msvc/vs17/mpir-tests/mpn.asmtype/mpn.asmtype.vcxproj # msvc/vs17/mpir-tests/mpn.dc_div_q/mpn.dc_div_q.vcxproj # msvc/vs17/mpir-tests/mpn.dc_div_qr/mpn.dc_div_qr.vcxproj # msvc/vs17/mpir-tests/mpn.dc_div_qr_n/mpn.dc_div_qr_n.vcxproj # msvc/vs17/mpir-tests/mpn.dc_divappr_q/mpn.dc_divappr_q.vcxproj # msvc/vs17/mpir-tests/mpn.divebyff/mpn.divebyff.vcxproj # msvc/vs17/mpir-tests/mpn.divebyfobm1/mpn.divebyfobm1.vcxproj # msvc/vs17/mpir-tests/mpn.divrem_1/mpn.divrem_1.vcxproj # msvc/vs17/mpir-tests/mpn.gcdext/mpn.gcdext.vcxproj # msvc/vs17/mpir-tests/mpn.get_d/mpn.get_d.vcxproj # msvc/vs17/mpir-tests/mpn.hgcd/mpn.hgcd.vcxproj # msvc/vs17/mpir-tests/mpn.instrument/mpn.instrument.vcxproj # msvc/vs17/mpir-tests/mpn.inv_divappr_q/mpn.inv_divappr_q.vcxproj # msvc/vs17/mpir-tests/mpn.invert/mpn.invert.vcxproj # msvc/vs17/mpir-tests/mpn.iord_u/mpn.iord_u.vcxproj # msvc/vs17/mpir-tests/mpn.logic/mpn.logic.vcxproj # msvc/vs17/mpir-tests/mpn.lorrshift1/mpn.lorrshift1.vcxproj # msvc/vs17/mpir-tests/mpn.matrix22/mpn.matrix22.vcxproj # msvc/vs17/mpir-tests/mpn.mp_bases/mpn.mp_bases.vcxproj # msvc/vs17/mpir-tests/mpn.mullow_basecase/mpn.mullow_basecase.vcxproj # msvc/vs17/mpir-tests/mpn.mullowhigh/mpn.mullowhigh.vcxproj # msvc/vs17/mpir-tests/mpn.mulmid/mpn.mulmid.vcxproj # msvc/vs17/mpir-tests/mpn.mulmod_2expm1/mpn.mulmod_2expm1.vcxproj # msvc/vs17/mpir-tests/mpn.neg/mpn.neg.vcxproj # msvc/vs17/mpir-tests/mpn.perfsqr/mpn.perfsqr.vcxproj # msvc/vs17/mpir-tests/mpn.redc_1/mpn.redc_1.vcxproj # msvc/vs17/mpir-tests/mpn.sb_div_q/mpn.sb_div_q.vcxproj # msvc/vs17/mpir-tests/mpn.sb_div_qr/mpn.sb_div_qr.vcxproj # msvc/vs17/mpir-tests/mpn.sb_divappr_q/mpn.sb_divappr_q.vcxproj # msvc/vs17/mpir-tests/mpn.scan/mpn.scan.vcxproj # msvc/vs17/mpir-tests/mpn.sizeinbase/mpn.sizeinbase.vcxproj # msvc/vs17/mpir-tests/mpn.subadd_n/mpn.subadd_n.vcxproj # msvc/vs17/mpir-tests/mpn.tdiv_q/mpn.tdiv_q.vcxproj # msvc/vs17/mpir-tests/mpq.aors/mpq.aors.vcxproj # msvc/vs17/mpir-tests/mpq.cmp/mpq.cmp.vcxproj # msvc/vs17/mpir-tests/mpq.cmp_si/mpq.cmp_si.vcxproj # msvc/vs17/mpir-tests/mpq.cmp_ui/mpq.cmp_ui.vcxproj # msvc/vs17/mpir-tests/mpq.equal/mpq.equal.vcxproj # msvc/vs17/mpir-tests/mpq.get_d/mpq.get_d.vcxproj # msvc/vs17/mpir-tests/mpq.get_str/mpq.get_str.vcxproj # msvc/vs17/mpir-tests/mpq.inp_str/mpq.inp_str.vcxproj # msvc/vs17/mpir-tests/mpq.md_2exp/mpq.md_2exp.vcxproj # msvc/vs17/mpir-tests/mpq.set_f/mpq.set_f.vcxproj # msvc/vs17/mpir-tests/mpq.set_str/mpq.set_str.vcxproj # msvc/vs17/mpir-tests/mpz.addsub/mpz.addsub.vcxproj # msvc/vs17/mpir-tests/mpz.aorsmul/mpz.aorsmul.vcxproj # msvc/vs17/mpir-tests/mpz.bin/mpz.bin.vcxproj # msvc/vs17/mpir-tests/mpz.bit/mpz.bit.vcxproj # msvc/vs17/mpir-tests/mpz.cdiv_ui/mpz.cdiv_ui.vcxproj # msvc/vs17/mpir-tests/mpz.cmp/mpz.cmp.vcxproj # msvc/vs17/mpir-tests/mpz.cmp_d/mpz.cmp_d.vcxproj # msvc/vs17/mpir-tests/mpz.cmp_si/mpz.cmp_si.vcxproj # msvc/vs17/mpir-tests/mpz.cong/mpz.cong.vcxproj # msvc/vs17/mpir-tests/mpz.cong_2exp/mpz.cong_2exp.vcxproj # msvc/vs17/mpir-tests/mpz.convert/mpz.convert.vcxproj # msvc/vs17/mpir-tests/mpz.div_2exp/mpz.div_2exp.vcxproj # msvc/vs17/mpir-tests/mpz.dive/mpz.dive.vcxproj # msvc/vs17/mpir-tests/mpz.dive_ui/mpz.dive_ui.vcxproj # msvc/vs17/mpir-tests/mpz.divis/mpz.divis.vcxproj # msvc/vs17/mpir-tests/mpz.divis_2exp/mpz.divis_2exp.vcxproj # msvc/vs17/mpir-tests/mpz.export/mpz.export.vcxproj # msvc/vs17/mpir-tests/mpz.fac_ui/mpz.fac_ui.vcxproj # msvc/vs17/mpir-tests/mpz.fdiv/mpz.fdiv.vcxproj # msvc/vs17/mpir-tests/mpz.fdiv_ui/mpz.fdiv_ui.vcxproj # msvc/vs17/mpir-tests/mpz.fib_ui/mpz.fib_ui.vcxproj # msvc/vs17/mpir-tests/mpz.fits/mpz.fits.vcxproj # msvc/vs17/mpir-tests/mpz.gcd/mpz.gcd.vcxproj # msvc/vs17/mpir-tests/mpz.gcd_ui/mpz.gcd_ui.vcxproj # msvc/vs17/mpir-tests/mpz.get_d/mpz.get_d.vcxproj # msvc/vs17/mpir-tests/mpz.get_d_2exp/mpz.get_d_2exp.vcxproj # msvc/vs17/mpir-tests/mpz.get_si/mpz.get_si.vcxproj # msvc/vs17/mpir-tests/mpz.get_sx/mpz.get_sx.vcxproj # msvc/vs17/mpir-tests/mpz.get_ux/mpz.get_ux.vcxproj # msvc/vs17/mpir-tests/mpz.hamdist/mpz.hamdist.vcxproj # msvc/vs17/mpir-tests/mpz.import/mpz.import.vcxproj # msvc/vs17/mpir-tests/mpz.inp_str/mpz.inp_str.vcxproj # msvc/vs17/mpir-tests/mpz.io_raw/mpz.io_raw.vcxproj # msvc/vs17/mpir-tests/mpz.jac/mpz.jac.vcxproj # msvc/vs17/mpir-tests/mpz.lcm/mpz.lcm.vcxproj # msvc/vs17/mpir-tests/mpz.likely_prime_p/mpz.likely_prime_p.vcxproj # msvc/vs17/mpir-tests/mpz.limbs/mpz.limbs.vcxproj # msvc/vs17/mpir-tests/mpz.logic/mpz.logic.vcxproj # msvc/vs17/mpir-tests/mpz.lucnum_ui/mpz.lucnum_ui.vcxproj # msvc/vs17/mpir-tests/mpz.mfac_uiui/mpz.mfac_uiui.vcxproj # msvc/vs17/mpir-tests/mpz.mul/mpz.mul.vcxproj # msvc/vs17/mpir-tests/mpz.mul_i/mpz.mul_i.vcxproj # msvc/vs17/mpir-tests/mpz.next_prime_candidate/mpz.next_prime_candidate.vcxproj # msvc/vs17/mpir-tests/mpz.oddeven/mpz.oddeven.vcxproj # msvc/vs17/mpir-tests/mpz.perfpow/mpz.perfpow.vcxproj # msvc/vs17/mpir-tests/mpz.perfsqr/mpz.perfsqr.vcxproj # msvc/vs17/mpir-tests/mpz.popcount/mpz.popcount.vcxproj # msvc/vs17/mpir-tests/mpz.pow/mpz.pow.vcxproj # msvc/vs17/mpir-tests/mpz.powm/mpz.powm.vcxproj # msvc/vs17/mpir-tests/mpz.powm_ui/mpz.powm_ui.vcxproj # msvc/vs17/mpir-tests/mpz.pprime_p/mpz.pprime_p.vcxproj # msvc/vs17/mpir-tests/mpz.primorial_ui/mpz.primorial_ui.vcxproj # msvc/vs17/mpir-tests/mpz.reuse/mpz.reuse.vcxproj # msvc/vs17/mpir-tests/mpz.root/mpz.root.vcxproj # msvc/vs17/mpir-tests/mpz.scan/mpz.scan.vcxproj # msvc/vs17/mpir-tests/mpz.set_d/mpz.set_d.vcxproj # msvc/vs17/mpir-tests/mpz.set_f/mpz.set_f.vcxproj # msvc/vs17/mpir-tests/mpz.set_si/mpz.set_si.vcxproj # msvc/vs17/mpir-tests/mpz.set_str/mpz.set_str.vcxproj # msvc/vs17/mpir-tests/mpz.set_sx/mpz.set_sx.vcxproj # msvc/vs17/mpir-tests/mpz.set_ux/mpz.set_ux.vcxproj # msvc/vs17/mpir-tests/mpz.sizeinbase/mpz.sizeinbase.vcxproj # msvc/vs17/mpir-tests/mpz.sqrtrem/mpz.sqrtrem.vcxproj # msvc/vs17/mpir-tests/mpz.tdiv/mpz.tdiv.vcxproj # msvc/vs17/mpir-tests/mpz.tdiv_ui/mpz.tdiv_ui.vcxproj # msvc/vs17/mpir-tests/mpz.trial_division/mpz.trial_division.vcxproj # msvc/vs17/mpir-tests/rand.iset/rand.iset.vcxproj # msvc/vs17/mpir-tests/rand.lc2exp/rand.lc2exp.vcxproj # msvc/vs17/mpir-tests/rand.mt/rand.mt.vcxproj # msvc/vs17/mpir-tests/rand.rand/rand.rand.vcxproj # msvc/vs17/mpir-tests/rand.urbui/rand.urbui.vcxproj # msvc/vs17/mpir-tests/rand.urmui/rand.urmui.vcxproj # msvc/vs17/mpir-tests/rand.urndmm/rand.urndmm.vcxproj # msvc/vs17/mpir-tests/run-tests.py # msvc/vs17/mpir-tune.sln # msvc/vs17/mpir-tune/lib_speed/lib_speed.vcxproj # msvc/vs17/mpir-tune/lib_speed/lib_speed.vcxproj.filters # msvc/vs17/mpir-tune/speed/speed.vcxproj # msvc/vs17/mpir-tune/speed/speed.vcxproj.filters # msvc/vs17/mpir-tune/try/try.vcxproj # msvc/vs17/mpir-tune/try/try.vcxproj.filters # msvc/vs17/mpir-tune/tune/divrem_1.c # msvc/vs17/mpir-tune/tune/fac_ui.c # msvc/vs17/mpir-tune/tune/mod_1.c # msvc/vs17/mpir-tune/tune/mulmod_2expp1.c # msvc/vs17/mpir-tune/tune/normmod_2expp1.c # msvc/vs17/mpir-tune/tune/revbin.c # msvc/vs17/mpir-tune/tune/split_bits.c # msvc/vs17/mpir-tune/tune/sqr_basecase.asm # msvc/vs17/mpir-tune/tune/tune.vcxproj # msvc/vs17/mpir-tune/tune/tune.vcxproj.filters # msvc/vs17/mpir-tune/tune/tune_prebuild.bat # msvc/vs17/mpir-tune/tune/tune_prebuild.py # msvc/vs17/msbuild.bat # msvc/vs17/run-speed.py # msvc/vs17/run-tests.py # msvc/vs17/version_info.py # msvc/vsyasm.props # msvc/vsyasm.xml # msvc/win_timing.c # msvc/win_timing.h
73 lines
2.3 KiB
Batchfile
73 lines
2.3 KiB
Batchfile
@echo off
|
|
rem %1 = architecture
|
|
rem %2 = library type (LIB|DLL)
|
|
rem %3 = platform (Win32|x64)
|
|
rem %4 = configuration (Release|Debug)
|
|
rem %5 = build tests (|+tests)
|
|
|
|
if "%4" NEQ "" if "%3" NEQ "" if "%2" NEQ "" if "%1" NEQ "" goto cont
|
|
call :get_architectures -
|
|
echo usage: msbuild architecture=^<%architectures:|=^|%^> library_type=^<LIB^|DLL^> platform=^<Win32^|x64^> configuration=^<Release^|Debug^>
|
|
goto :eof
|
|
|
|
:cont
|
|
rem example use: msbuild sandybridge_ivybridge dll x64 release
|
|
|
|
if not exist "lib_mpir_%1" (call :get_architectures & call :seterr & echo ERROR: architecture is one of %architectures% ^(not "%1"^) & exit /b %errorlevel%)
|
|
if /i "%2" EQU "DLL" (set libp=dll) else (if /i "%2" EQU "LIB" (set libp=lib) else ((call :seterr & echo ERROR: library type is "lib" or "dll" ^(not "%2"^) & exit /b %errorlevel%)))
|
|
if /i "%3" EQU "x64" (set plat=x64) else (if /i "%3" EQU "Win32" (set plat=win32) else (call :seterr & echo ERROR: platform is "Win32" or "x64" ^(not "%3"^) & exit /b %errorlevel%))
|
|
if /i "%4" EQU "Debug" (set conf=Debug) else (if /i "%4" EQU "Release" (set conf=Release) else (call :seterr & echo ERROR: configuration is "Release" or "Debug" ^(not "%4"^) & exit /b %errorlevel%))
|
|
|
|
set src=%libp%_mpir_%1
|
|
|
|
rem This is the directory where Microsoft MSBUILD is installed
|
|
set msbdir="C:\Program Files (x86)\MSBuild\14.0\Bin"
|
|
|
|
rem This is the Visual Studio build directory (within the MPIR directory)
|
|
set srcdir="."
|
|
|
|
%msbdir%\msbuild.exe /p:Platform=%plat% /p:Configuration=%conf% %srcdir%\%src%\%src%.vcxproj
|
|
|
|
if /i "%libp%" == "LIB" (
|
|
%msbdir%\msbuild.exe /p:Platform=%plat% /p:Configuration=%conf% %srcdir%\lib_mpir_cxx\lib_mpir_cxx.vcxproj
|
|
)
|
|
|
|
if /i "%5" EQU "+tests" (
|
|
for /d %%d in (.\mpir-tests\*) do (
|
|
for %%f in (%%d\*.vcxproj) do (
|
|
%msbdir%\msbuild.exe /property:SolutionDir=..\..\ /property:OutDir=..\..\%plat%\%conf%\ /p:Platform=%plat% /p:Configuration=%conf% %%f
|
|
)
|
|
)
|
|
)
|
|
|
|
:get_architectures
|
|
set architectures=
|
|
for /d %%a in (lib_mpir_*) do (call :add_architecture %%a %1)
|
|
goto :eof
|
|
|
|
:add_architecture
|
|
for /f "tokens=3,* delims=_" %%a in ("%1") do set arch=%%a
|
|
if _%2_ == __ (
|
|
set "delim= or "
|
|
set arch=^"%arch%^"
|
|
) else (
|
|
set delim=^|
|
|
)
|
|
|
|
if "%architectures%" == "" (
|
|
set "architectures=%arch%"
|
|
) else (
|
|
set "architectures=%architectures%%delim%%arch%"
|
|
)
|
|
goto :eof
|
|
|
|
:set_arch
|
|
set arch=%1
|
|
goto :eof
|
|
|
|
:clrerr
|
|
exit /b 0
|
|
|
|
:seterr
|
|
exit /b 1
|