4 echo "Usage: wintest.bat <Release | ReleaseDLL | Debug | DebugDLL"
8 if not exist sodium_version.c (
10 if not exist sodium_version.c (
11 echo "Are you on the right path?" %CD%
16 if "%2" == "x64" (SET ARCH=x64) else (SET ARCH=Win32)
17 SET CFLAGS=/nologo /DTEST_SRCDIR=\".\" /I..\..\src\libsodium\include\sodium /I..\..\src\libsodium\include /I..\quirks
18 SET LDFLAGS=/link /LTCG advapi32.lib ..\..\Build\%1\%ARCH%\libsodium.lib
19 if "%1" == "ReleaseDLL" ( goto :ReleaseDLL )
20 if "%1" == "DebugDLL" ( goto :DebugDLL )
21 if "%1" == "Release" ( goto :Release )
22 if "%1" == "Debug" ( goto :Debug )
23 echo "Invalid build type"
26 SET CFLAGS=%CFLAGS% /MD /Ox
27 SET PATH=..\..\Build\%1\%ARCH%;%PATH%
30 SET CFLAGS=%CFLAGS% /MT /Ox /DSODIUM_STATIC /DSODIUM_EXPORT=
33 SET CFLAGS=%CFLAGS% /GS /MDd /Od
34 SET PATH=..\..\Build\%1\%ARCH%;%PATH%
37 SET CFLAGS=%CFLAGS% /GS /MTd /Od /DSODIUM_STATIC /DSODIUM_EXPORT=
40 echo Running the test suite:
42 cl %CFLAGS% %%f %LDFLAGS% /OUT:%%f.exe > NUL 2>&1
43 if not exist %%f.exe (
44 echo %%f compile failed
54 REM Remove temporary files