Wiki
Clone wikivera++ / developers / Building
Compiling Vera++
Getting the sources
From the download section
Just download the vera++ sources from the downloads section and extract it.
The source tarball is called vera++-X.Y.Z.tar.gz
where X.Y.Z
is the version number.
The documentation can be downloaded in the tarball vera++-X.Y.Z-doc.tar.gz
. It is useful to build vera++ from the source without the need to install pandoc to build the documentation.
With git
To get a copy of Vera++'s repository, run:
git clone https://bitbucket.org/verateam/vera.git
cd vera
git submodule update --init
To update that repository, run:
git pull
git submodule update
Note that the submodule is only needed to build the documentation. If it is not there, a warning is displayed and the documentation is not generated.
Dependencies
Vera++ is implemented in C++ and depends on the Boost and Tcl libraries. It uses CMake as build system. The documentation is generated with pandoc.
Note that pandoc is only needed to build the documentation. If it is not found, a warning is displayed and the documentation is not generated.
Installing Boost on Windows
Download boost to some place. Unzip the archive.
- Go to the directory tools\build.
- Run bootstrap.bat
- Run b2 install --prefix=PREFIX where PREFIX is the directory where you want Boost.Build to be installed
- Add PREFIX\bin to your PATH environment variable.
More documentation can be found at the Boost website
Installing Boost.Python on Windows
Once boost is installed on windows you can add the python support for vera++ by installing the Boost.Python module.
- Go again to the directory tools\build.
- Run bjam --with-python
- Run b2 install --prefix=PREFIX where PREFIX is the directory where you want Boost.Build to be installed
Configuring and building
To build vera++, as with any CMake project, run either, cmake
, ccmake
or cmake-gui
, configure and generate the project, and build the project with your build environment. You can then install vera++ by building the install
target, or generate a package by building the package
target.
On unix compatible systems (Linux, *BSD, Mac OS X, ...), this is done this way:
cd vera
mkdir build
cd build
cmake ..
make -j
make install
See Running CMake for more information.
Testing
Vera++ uses CTest, the testing tool that comes with CMake. To run the tests, simply type
ctest
in your build directory.
The test results can be submitted to the vera++'s dashboard with the command
ctest -D Experimental
To submit nightly tests, it is easier to create a test directory, copy vera.ctest
from vera++'s sources to that directory and create a new file vera.cmake
like this one:
set(CTEST_SITE "host.site")
set(CTEST_BUILD_NAME "compiler name")
set(CTEST_BUILD_CONFIGURATION Debug)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
include(${CTEST_SCRIPT_DIRECTORY}/vera.ctest)
adjust the values, and run every nights:
ctest -S /path/to/vera.cmake
The test results will appear on vera++'s dashboard. See CMake Scripting Of CTest for more details.
Packages
Vera++ uses CPack
to generate the binary and source packages.
Source package
Just build the package_source
target to generate the source archive as a tar.gz
file.
Make sure your repository is clean with git status
before generating the package.
Documentation package
Build the package_doc
target to generate the documentation archive as a tar.gz
file.
Mac OS X package
CPack
depends on PackageMaker to generate this package.
Set the CMake options:
CMAKE_BUILD_TYPE
toRelease
,VERA_USE_SYSTEM_LUA
toOFF
,CMAKE_INSTALL_PREFIX
to/usr
.
and build the target package
.
Microsoft Windows
CPack
depends on NSIS to generate this package.
Set the CMake options:
VERA_USE_SYSTEM_BOOST
toOFF
,VERA_USE_SYSTEM_LUA
toOFF
,VERA_USE_SYSTEM_PYTHON
toOFF
,
and build the target package
in Release
mode.
Linux Debian
Set the CMake option CMAKE_BUILD_TYPE
to Release
and build the target package
.
Linux RPM
Set the CMake option CMAKE_BUILD_TYPE
to Release
and build the target package
.
Note: this package generation has not yet been tested.
Updated