Building SourceGear Veracity under Mac OS


Assumed - you are running Mac OS Snow Leopard (10.6) and are comfortable at a terminal prompt.

Getting/Unpacking the Source

Retrieve the latest Veracity tarball from sourcegear

Unpack it under the directory of your choice - for brevity, we'll pretend you unpacked it under ~/v, and so your source tree begins at ~/v/veracity


XCode Toolkit

If you don't already have XCode 3.2 (or higher) installed, you can find it on your Snow Leopard install DVD.

If you don't have a Snow Leopard install DVD, you can download Xcode from the Apple Developer web site.

If you decide to download Xcode, you'll need to register as an Apple Developer. It's free. It's quick.

Having done that, visit the Download Xcode page, then click "Mac Dev Center" and retrieve the latest Xcode and iPhone SDK -- currently Xcode 3.2.3 and iPhone SDK 4. That's the version used in the preparation of this document.

Install as instructed.


Install CMake

Download the Darwin installer, and install as instructed.

Build vv-thirdparty

Finally, we're ready to compile the third-party libraries that we use. On 64-bit machines these libraries are built as universal binaries. On 32-bit machines they must be built 32-bit only.

cd ~/v/veracity/thirdparty
OR (for 32-bit machines)
./ i386

This will create the vv-thirdparty folder at ~/v/vv-thirdparty.

You'll want this in your library path, so edit ~/.profile and add:

export DYLD_LIBRARY_PATH=~/v/vv-thirdparty/universal/lib:$DYLD_LIBRARY_PATH
OR (for 32-bit)
export DYLD_LIBRARY_PATH=~/v/vv-thirdparty/i386/lib:$DYLD_LIBRARY_PATH

You should open a new terminal window to ensure this is in effect before building/running Veracity.

Creating the Build Directory and Building Veracity

cmake will handle the creation of Makefiles, etc. You just need to give it a place to work.

For example, let's create a ~/v/debug, a neighbor of our source directory.

cd to this folder, then run:

cmake -G "Unix Makefiles" ../veracity

You now have a build tree, replete with Makefiles. You'll only need to run the top-level one. So:

cd ~/v/debug

Updating your PATH to find Veracity Command Line Tools

To make your life easier at this point, you'll want to add the following to your PATH:


the homes of vv (the Veracity command-line app) and vscript (the scripting engine), respectively.

Running the Test Suite

To run the test suite:

cd ~/v/debug
make test