Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 62 lines (52 sloc) 1.267 kb
c6b82ca Kimmo Varis Add simple batch file to build cppcheck projects in Windows.
kimmov authored
1 @echo off
2 REM A simple script to build different cppcheck targets from project root
c48eb09 Kimmo Varis Add "all" target for build.bat.
kimmov authored
3 REM folder. This script can be run from VS prompt or Qt prompt.
c6b82ca Kimmo Varis Add simple batch file to build cppcheck projects in Windows.
kimmov authored
4 REM
d1b43c5 Kimmo Varis Allow building both debug and release targets using build.bat.
kimmov authored
5 REM Usage: build <target> [release|debug]
c48eb09 Kimmo Varis Add "all" target for build.bat.
kimmov authored
6 REM where <target> is any of cppcheck/gui/tests/all
d1b43c5 Kimmo Varis Allow building both debug and release targets using build.bat.
kimmov authored
7 REM release or debug is the configuration
c48eb09 Kimmo Varis Add "all" target for build.bat.
kimmov authored
8 REM all-target builds both cppcheck and gui.
c6b82ca Kimmo Varis Add simple batch file to build cppcheck projects in Windows.
kimmov authored
9 REM
10 REM TODO:
11 REM - run tests too
12
d1b43c5 Kimmo Varis Allow building both debug and release targets using build.bat.
kimmov authored
13 if "%1" == "" goto help
14
b927255 Kimmo Varis Improve build.bat to support building from QT prompt.
kimmov authored
15 REM QT prompt sets QMAKESPEC
16 if NOT "%QMAKESPEC%" == "" (
17 set MAKE=mingw32-make
18 ) else (
19 set MAKE=nmake
20 )
21
888fe5a Kimmo Varis Make release the default target in build.bat.
kimmov authored
22 if "%2" == "" set TARGET=release
23 if "%2" == "release" set TARGET=release
24 if "%2" == "debug" set TARGET=debug
25
c6b82ca Kimmo Varis Add simple batch file to build cppcheck projects in Windows.
kimmov authored
26 if "%1" == "cppcheck" goto cppcheck
27 if "%1" == "gui" goto gui
28 if "%1" == "tests" goto tests
c48eb09 Kimmo Varis Add "all" target for build.bat.
kimmov authored
29 if "%1" == "all" goto cppcheck
c6b82ca Kimmo Varis Add simple batch file to build cppcheck projects in Windows.
kimmov authored
30 goto help
31
32 :cppcheck
fada751 Kimmo Varis Fix build.bat after directory renames.
kimmov authored
33 cd cli
888fe5a Kimmo Varis Make release the default target in build.bat.
kimmov authored
34 qmake -config %TARGET%
b927255 Kimmo Varis Improve build.bat to support building from QT prompt.
kimmov authored
35 %MAKE%
c6b82ca Kimmo Varis Add simple batch file to build cppcheck projects in Windows.
kimmov authored
36 cd ..
c48eb09 Kimmo Varis Add "all" target for build.bat.
kimmov authored
37 if "%1" == "all" goto gui
c6b82ca Kimmo Varis Add simple batch file to build cppcheck projects in Windows.
kimmov authored
38 goto end
39
40 :gui
41 cd gui
888fe5a Kimmo Varis Make release the default target in build.bat.
kimmov authored
42 qmake -config %TARGET%
b927255 Kimmo Varis Improve build.bat to support building from QT prompt.
kimmov authored
43 %MAKE%
c6b82ca Kimmo Varis Add simple batch file to build cppcheck projects in Windows.
kimmov authored
44 lrelease gui.pro
45 cd ..
46 goto end
47
48 :tests
49 cd test
888fe5a Kimmo Varis Make release the default target in build.bat.
kimmov authored
50 qmake -config %TARGET%
b927255 Kimmo Varis Improve build.bat to support building from QT prompt.
kimmov authored
51 %MAKE%
c6b82ca Kimmo Varis Add simple batch file to build cppcheck projects in Windows.
kimmov authored
52 cd ..
53 goto end
54
55 :help
d1b43c5 Kimmo Varis Allow building both debug and release targets using build.bat.
kimmov authored
56 echo "Syntax: build <target> [debug|release]"
c48eb09 Kimmo Varis Add "all" target for build.bat.
kimmov authored
57 echo " where <target> is any of cppcheck/gui/tests/all"
d1b43c5 Kimmo Varis Allow building both debug and release targets using build.bat.
kimmov authored
58 echo " debug or release define used configuration"
c48eb09 Kimmo Varis Add "all" target for build.bat.
kimmov authored
59 echo " all- target builds both cppcheck and gui.
c6b82ca Kimmo Varis Add simple batch file to build cppcheck projects in Windows.
kimmov authored
60
61 :end
Something went wrong with that request. Please try again.