|
1 | | -PCRE is a library that is used by the optional "rules" feature for the command |
2 | | -line version of cppcheck. It is readily available on Linux and Mac OS X, but |
3 | | -must be obtained separately for Windows. |
4 | | -
|
5 | | -If you're using qmake to generate makefiles, the following behavior applies: |
6 | | -
|
7 | | -- If you're not on Windows, it assumes by default that you have PCRE and want |
8 | | - to enable rules support. You can disable rules support (removing the PCRE |
9 | | - dependency) by passing HAVE_RULES=no to qmake. |
10 | | -
|
11 | | -- If you are on Windows, but have PCRE available, you can enable rules support |
12 | | - by passing HAVE_RULES=yes to qmake. |
13 | | -
|
14 | | - - Note: This includes using build.bat since it calls qmake - to use PCRE and |
15 | | - build.bat, you need to run set HAVE_RULES=yes before each run of build.bat |
16 | | -
|
17 | | -
|
18 | | -Build instructions |
19 | | ------------------- |
20 | | -
|
21 | | -Windows |
22 | | -------- |
23 | | -
|
24 | | -Visual Studio |
25 | | -
|
26 | | -To build PCRE, download the source code from www.pcre.org and |
27 | | -CMake (https://cmake.org/download/). We assume you use Visual Studio 2015 - |
28 | | -otherwise adapt the commands for your version. |
29 | | -
|
30 | | -VS Solution file |
31 | | - cmake . -G "Visual Studio 14 2015" |
32 | | - Open PCRE.sln with VS IDE or via cmd: |
33 | | - call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 |
34 | | - MSBuild PCRE.sln /target:Build /property:Configuration="Release" |
35 | | -
|
36 | | - For 64-bit target: cmake . -G "Visual Studio 14 2015 Win64" |
37 | | -
|
38 | | -or using NMake |
39 | | - call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 |
40 | | - cmake . -G "NMake Makefiles" |
41 | | - nmake |
42 | | -
|
43 | | -or using MSYS |
44 | | - cmake . -G "MSYS Makefiles" |
45 | | - make |
46 | | -
|
47 | | -
|
48 | | -Linux |
49 | | ------ |
50 | | -
|
51 | | -The normal Makefile should work. |
52 | | -
|
53 | | -Install PCRE on Ubuntu might be needed: |
54 | | - sudo apt-get install libpcre3 libpcre3-dev |
55 | | -
|
56 | | -
|
57 | | -Mac OSX |
58 | | -------- |
59 | | -
|
60 | | -Install PCRE: |
61 | | -
|
62 | | -homebre |
63 | | - brew install pcre |
64 | | -
|
65 | | -or macport |
66 | | - sudo port install pcre |
67 | | -
|
68 | | -Ensure /path/to/pcre.h is in CXXFLAGS, e.g: |
69 | | -
|
70 | | -for homebrew |
71 | | - export CXXFLAGS=${CXXFLAGS}:/usr/local/include |
72 | | -
|
73 | | -or macport |
74 | | - export CXXFLAGS=${CXXFLAGS}:/opt/local/include |
75 | | -
|
76 | | -Or for MSVC copy pcre.lib and pcre.h in /externals directory. |
| 1 | +PCRE is a library that is used by the optional "rules" feature for the command |
| 2 | +line version of cppcheck. It is readily available on Linux and Mac OS X, but |
| 3 | +must be obtained separately for Windows. |
| 4 | + |
| 5 | +If you're using qmake to generate makefiles, the following behavior applies: |
| 6 | + |
| 7 | +- If you're not on Windows, it assumes by default that you have PCRE and want |
| 8 | + to enable rules support. You can disable rules support (removing the PCRE |
| 9 | + dependency) by passing HAVE_RULES=no to qmake. |
| 10 | + |
| 11 | +- If you are on Windows, but have PCRE available, you can enable rules support |
| 12 | + by passing HAVE_RULES=yes to qmake. |
| 13 | + |
| 14 | + - Note: This includes using build.bat since it calls qmake - to use PCRE and |
| 15 | + build.bat, you need to run set HAVE_RULES=yes before each run of build.bat |
| 16 | + |
| 17 | + |
| 18 | +Build instructions |
| 19 | +------------------ |
| 20 | + |
| 21 | +Windows |
| 22 | +------- |
| 23 | + |
| 24 | +Visual Studio |
| 25 | + |
| 26 | +To build PCRE, download the source code from www.pcre.org and |
| 27 | +CMake (https://cmake.org/download/). We assume you use Visual Studio 2015 - |
| 28 | +otherwise adapt the commands for your version. |
| 29 | + |
| 30 | +VS Solution file |
| 31 | + cmake . -G "Visual Studio 14 2015" |
| 32 | + Open PCRE.sln with VS IDE or via cmd: |
| 33 | + call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 |
| 34 | + MSBuild PCRE.sln /target:Build /property:Configuration="Release" |
| 35 | + |
| 36 | + For 64-bit target: cmake . -G "Visual Studio 14 2015 Win64" |
| 37 | + |
| 38 | +or using NMake |
| 39 | + call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 |
| 40 | + cmake . -G "NMake Makefiles" |
| 41 | + nmake |
| 42 | + |
| 43 | +or using MSYS |
| 44 | + cmake . -G "MSYS Makefiles" |
| 45 | + make |
| 46 | + |
| 47 | + |
| 48 | +Linux |
| 49 | +----- |
| 50 | + |
| 51 | +The normal Makefile should work. |
| 52 | + |
| 53 | +Install PCRE on Ubuntu might be needed: |
| 54 | + sudo apt-get install libpcre3 libpcre3-dev |
| 55 | + |
| 56 | + |
| 57 | +Mac OSX |
| 58 | +------- |
| 59 | + |
| 60 | +Install PCRE: |
| 61 | + |
| 62 | +homebre |
| 63 | + brew install pcre |
| 64 | + |
| 65 | +or macport |
| 66 | + sudo port install pcre |
| 67 | + |
| 68 | +Ensure /path/to/pcre.h is in CXXFLAGS, e.g: |
| 69 | + |
| 70 | +for homebrew |
| 71 | + export CXXFLAGS=${CXXFLAGS}:/usr/local/include |
| 72 | + |
| 73 | +or macport |
| 74 | + export CXXFLAGS=${CXXFLAGS}:/opt/local/include |
| 75 | + |
| 76 | +Or for MSVC copy pcre.lib and pcre.h in /externals directory. |
0 commit comments