cppcheck/build-pcre.txt

69 lines
1.9 KiB
Plaintext
Raw Normal View History

PCRE is a library that is used by the optional "rules" feature. (It adds
some additional features to the command line client.) It's readily available
on Linux and Mac OS X, but must be obtained separately for Windows.
If you're using qmake to generate makefiles, the following behavior applies:
- If you're not on Windows, it assumes by default that you have PCRE and want
2013-08-31 16:12:48 +02:00
to enable rules support.
- If you're not on Windows, you can disable rules support (removing the PCRE
2013-08-31 16:12:48 +02:00
dependency) by passing HAVE_RULES=no to qmake.
- If you are on Windows, but have PCRE available, you can enable rules support
2013-08-31 16:12:48 +02:00
by passing HAVE_RULES=yes to qmake.
2013-08-31 16:12:48 +02:00
- Note: This includes using build.bat since it calls qmake - to use PCRE and
build.bat, you need to run set HAVE_RULES=yes before each run of build.bat
2010-12-12 11:56:22 +01:00
Some temporary build instructions. This is work in progress.
Windows
Visual Studio
2013-08-31 16:12:48 +02:00
To build PCRE, download the source code from www.pcre.org and
CMake (http://www.cmake.org/cmake/resources/software.html).
Then I assume you use MSVC 2010 otherwise adapt the commands for your version.
2010-12-12 11:56:22 +01:00
2013-08-31 16:12:48 +02:00
VS Solution file
cmake . -G "Visual Studio 10"
Open PCRE.sln with VS IDE or via cmd:
call "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" x86
MSBuild PCRE.sln /target:Build /property:Configuration="Release"
2010-12-12 11:56:22 +01:00
2013-08-31 16:12:48 +02:00
For 64-bit run: cmake . -G "Visual Studio 10 Win64"
2010-12-12 11:56:22 +01:00
2013-08-31 16:12:48 +02:00
or using NMake
call "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" x86
cmake . -G "NMake Makefiles"
nmake
2010-12-12 11:56:22 +01:00
2013-08-31 16:12:48 +02:00
or using MSYS
cmake . -G "MSYS Makefiles"
make
2010-12-12 11:56:22 +01:00
Linux
The normal Makefile should work
2013-08-31 16:12:48 +02:00
Install PCRE on Ubuntu might be needed:
sudo apt-get install libpcre3 libpcre3-dev
Mac OSX
2013-08-31 16:12:48 +02:00
Install PCRE:
2013-08-31 16:12:48 +02:00
sudo port install pcre
Ensure /path/to/pcre.h is in CXXFLAGS, e.g:
2013-08-31 16:12:48 +02:00
export CXXFLAGS=${CXXFLAGS}:/opt/local/include
Or for MSVC copy pcre.lib and pcre.h in /externals directory.