-
Notifications
You must be signed in to change notification settings - Fork 8
Build
Tristan Grimmer edited this page Dec 26, 2022
·
2 revisions
How to build Tacent and run the unit tests.
sudo apt update
sudo apt install build-essential # For GCC
sudo apt-get install git
sudo apt-get install clang # OPTIONAL
sudo apt-get install ninja-build
sudo apt-get install libx11-dev
Get VS Code and install downloaded deb file from official site. After installation it should manage updates. You could also install the snap. If you want to use Clang instead of GCC:
update-alternatives --config c++ # OPTIONAL Choose clang
update-alternatives --config cc # OPTIONAL Choose clang
Install cmake. Don't use apt. It's a few versions behind. cmake.org does supply a self-extracting .sh, but you won't get updates. Best is snap from what I can tell. If you use the Kubuntu Discover software app, the first listed cmake may be the older apt/deb verion. Scroll down to the snap (little magnet icon), it should be at latest.
# mkdir etc.
cmake .. -GNinja
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug
ninja install
ninja -v install
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug
OR
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=clang -DCMAKE_C_COMPILER=clang
Install both VS Code and Visual Studio 2022. Open the tacent directory in VS Code and choose the Visual Studio generator. F7 to build, F5 to run the unit tests.