Panther Search Documentation Tutorials Devlogs Downloads Source Code

Building PCIT Project Software

Download/Build


These are the building instructions for the PCIT Project software.

Import Note

This is not a simple build. If this is your first time building a large C++ project, it is not recommended that you try to build this.

Requirements

Info

This has only been tested on Windows with Visual Studio 2022.

Building LLVM

At the moment, PCIT relies on LLVM, so we need to build LLVM first.

Warning!

Please the entirety of this section before doing any of the steps so you can make sure your computer is ready BEFORE you start!

1) Create a directory on your computer

  All LLVM source code and build results will go in this directory. The needed files will be moved from this directory once the process is completed (and the rest deleted), so this directory can go wherever you like.

2) Get the scripts

  There is a GitHub repository that contains the scripts required to download the LLVM Project source code and build it. A Windows version (.bat) and a Unix version (.sh) exist. Get the correct script for your machine, and put it in the directory you created in step 1.

3) Run

  Run the script. The first argument should either be Debug or Release. Here's an example:

Terminal
./build_llvm.windows.bat Release

  This script will clone the PCIT fork of LLVM, and compile it. If you would like to skip the cloning step (if you already cloned it into this directory), you can add the --no-clone argument at the end.

  This results in 76.2GB of storage space used (although only 8.19GB is needed to be kept). It is recommended to have at least 24GB of addressable memory.

Warning!

The Release build seems to be broken at the moment (an LLVM cmake bug?) and it builds a debug build anyway. The PCIT build system accounts for this to allow for release builds of PCIT to still work.

4) Finishing up

  Once the script has completed, you will see three directories within the one created in step 1: build, llvm-project, and output. You may delete build and llvm-project if you wish, as they are not needed to build PCIT. In addition, you can delete output/bin, output/libexec, and output/share as well (keep output/include and output/lib).

Building PCIT-CPP

Now that we have build LLVM, we can build PCIT.

1) Clone the repository

Terminal
git clone https://github.com/PCIT-Project/PCIT-CPP.git --recursive

  The --recursive argument is required to also clone the Evo standard library. LLVM and Evo are the only dependencies that PCIT-CPP has.

2) Add directory for LLVM

  Inside the /PCIT-CPP/dependencies/, add the directory LLVM_build

3) Add LLVM

  Within the output directory discussed in step 4 of Building LLVM, there should be a number of directories. Copy or move /output/include/ and /output/lib/, into the directory created in step 1 of Building PCIT-CPP.

4) Configuring PCIT build system with Premake5

  Premake is a build system configurator, so Premake5 is used to configure the build system. For more information, you can run premake5 --help. Navigate to the main directory of the PCIT-CPP repository, and select one of the following methods of running Premake5:

Using Microsoft Visual Studio:

Terminal
premake5 vs2022

Using GNU Make:

Terminal
premake5 gmake --cc=[COMPILER]

  Replace "[COMPILER]" with one of the following options

5) Build

Using Microsoft Visual Studio:

  Open PCIT-CPP.sln in Visual Studio, set the build configuration to ReleaseDist, and compile.

Using GNU Make:

Terminal
make configuration=releasedist_linux

6) Done!

  The generated output is in ./build/[Windows|Linux]/ReleaseDist/bin/. Enjoy PCIT!

Next Steps

Now that you have successfully built the PCIT Project software, maybe check out one of our tutorials.