| 1 |
@echo off |
| 2 |
|
| 3 |
pushd "%~dp0" |
| 4 |
SET TARGETPATH=%~dp0/../../src |
| 5 |
|
| 6 |
SET VCINSTALLDIR=%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC |
| 7 |
|
| 8 |
call :set_inc |
| 9 |
|
| 10 |
SET INC=-I %~dp0/../../src %INC% |
| 11 |
SET DEFS=-D__cplusplus -DWIN32 -D_WIN32 -D_NDEBUG -D_WINDOWS -D_MSC_VER=1500 -DUCHAR_MAX=0xFF -DUSHRT_MAX=0xFFFF |
| 12 |
SET DEFS=%DEFS% -DULONG_MAX=0xFFFFFFFF |
| 13 |
rem SET UNDEFS=-U_IRIS_DEBUGTEST_ENABLE -U_IRIS_MULTI_UNITTEST -U_IRIS_SUPPORT_MULTI_UNITTEST_GUI -U_IRIS_FPU_INLINE |
| 14 |
rem SET UNDEFS=%UNDEFS% -U_IRIS_XFPU_INLINE -U_IRIS_DX_RIGHTHAND -U_IRIS_SUPPORT_SAFE_ISTREAM -U_IRIS_SUPPORT_DCAST_DYNAMIC |
| 15 |
rem SET UNDEFS=%UNDEFS% -U_IRIS_SUPPORT_OPENAL -U_IRIS_SUPPORT_OGGVORBIS -U_IRIS_SUPPORT_GLUT -U_IRIS_SUPPORT_GLEW |
| 16 |
rem SET UNDEFS=%UNDEFS% -U_IRIS_SUPPORT_GLEXT -U_IRIS_SUPPORT_CG -U_IRIS_SUPPORT_FBX -U_IRIS_SUPPORT_PNG -U_IRIS_SUPPORT_SQUIRREL |
| 17 |
rem SET UNDEFS=%UNDEFS% -U_IRIS_SUPPORT_GOOGLETEST -U_IRIS_SUPPORT_MSXML -U_IRIS_SUPPORT_OPENCV=IRIS_DYNAMIC_LIB -U_IRIS_SUPPORT_WDK |
| 18 |
rem SET UNDEFS=%UNDEFS% -U_IRIS_SUPPORT_LUA -U_IRIS_SUPPORT_ANGELSCRIPT |
| 19 |
SET SUPPRESS=--inline-suppr |
| 20 |
rem SET CHECKCONFING=--check-config |
| 21 |
SET BUILDOPTIONS=%DEFS% %UNDEFS% %CHECKCONFING% --platform=win32A %INC% %EXCLUDE% |
| 22 |
SET OPTIONS=--template vs -f --std=c99 --enable=style %SUPPRESS% %BUILDOPTIONS% |
| 23 |
rem SET OPTIONS=--template vs --enable=all |
| 24 |
rem SET OPTIONS= |
| 25 |
|
| 26 |
rem ���g�p�����`�F�b�N�������������������� |
| 27 |
rem call cppcheck --enable=exceptNew --enable=exceptRealloc --enable=style -j %NUMBER_OF_PROCESSORS% "%TARGETPATH%" |
| 28 |
rem call cppcheck --enable=exceptNew --enable=exceptRealloc --enable=style "%TARGETPATH%" |
| 29 |
|
| 30 |
rem �S������������������ |
| 31 |
@echo %OPTIONS% |
| 32 |
cd "%TARGETPATH%" |
| 33 |
call cppcheck %OPTIONS% -v --xml --report-progress ./ 2> "%~dp0\result.xml" |
| 34 |
if errorlevel 1 goto error |
| 35 |
popd |
| 36 |
|
| 37 |
call add_xsl.bat result.xml |
| 38 |
if errorlevel 1 goto error |
| 39 |
|
| 40 |
del /F /Q result.xml.org |
| 41 |
if errorlevel 1 goto error |
| 42 |
|
| 43 |
goto end |
| 44 |
|
| 45 |
:error |
| 46 |
pause |
| 47 |
popd |
| 48 |
exit /b 1 |
| 49 |
|
| 50 |
:end |
| 51 |
popd |
| 52 |
exit /b 0 |
| 53 |
|
| 54 |
|
| 55 |
:set_inc |
| 56 |
for /f "delims=;" %%a in ("%INCLUDE%") do call :add_inc "%%a" |
| 57 |
goto :EOF |
| 58 |
|
| 59 |
:add_inc |
| 60 |
SET ARG=%~1 |
| 61 |
if "%ARG:~-1%" == "\" ( |
| 62 |
SET INC=%INC% -I "%ARG:~0,-1%" |
| 63 |
SET EXCLUDE=%EXCLUDE% -i"%ARG:~0,-1%" |
| 64 |
) else ( |
| 65 |
SET INC=%INC% -I "%ARG%" |
| 66 |
SET EXCLUDE=%EXCLUDE% -i"%ARG%" |
| 67 |
) |
| 68 |
goto :EOF |