Allow building both debug and release targets using build.bat.

This commit is contained in:
Kimmo Varis 2010-01-09 13:46:43 +02:00
parent b927255da0
commit d1b43c521d
1 changed files with 10 additions and 7 deletions

View File

@ -2,14 +2,16 @@
REM A simple script to build different cppcheck targets from project root REM A simple script to build different cppcheck targets from project root
REM folder. REM folder.
REM REM
REM Usage: build <target> REM Usage: build <target> [release|debug]
REM where <target> is any of cppcheck/gui/tests REM where <target> is any of cppcheck/gui/tests
REM release or debug is the configuration
REM REM
REM TODO: REM TODO:
REM - build release targets (new switch?)
REM - add "all" target REM - add "all" target
REM - run tests too REM - run tests too
if "%1" == "" goto help
REM QT prompt sets QMAKESPEC REM QT prompt sets QMAKESPEC
if NOT "%QMAKESPEC%" == "" ( if NOT "%QMAKESPEC%" == "" (
set MAKE=mingw32-make set MAKE=mingw32-make
@ -24,14 +26,14 @@ goto help
:cppcheck :cppcheck
cd cli cd cli
qmake qmake -config %2
%MAKE% %MAKE%
cd .. cd ..
goto end goto end
:gui :gui
cd gui cd gui
qmake qmake -config %2
%MAKE% %MAKE%
lrelease gui.pro lrelease gui.pro
cd .. cd ..
@ -39,13 +41,14 @@ goto end
:tests :tests
cd test cd test
qmake qmake -config %2
%MAKE% %MAKE%
cd .. cd ..
goto end goto end
:help :help
echo Syntax: build <target> echo "Syntax: build <target> [debug|release]"
echo where <target> is any of cppcheck/gui/tests echo " where <target> is any of cppcheck/gui/tests"
echo " debug or release define used configuration"
:end :end