Software Setup, Build¶
As this site is heavily into C and C++ (it is into Python too, but that’s another story), it has lots of code in its many subdirectories and areas. This site is also into build and project management 1, so we do not let code bitrot.
This site has a CMake build associated with it, starting at the root directory of the checkout. It works as follows.
jfasch-home project is maintained on Github. Clone that. (I use to
store project clones in
$ cd ~/work/ $ git clone https://github.com/jfasch/jfasch-home.git
For trainings where we collaborate in a separate repository (I use to
create private repositories for some, and add the training
participants as collaborators), use that instead. (Exchange
<organization> with you custom name, of course.)
$ cd ~/work/ $ git clone https://github.com/jfasch/jfasch-home-<organization>.git jfasch-home
Technically, this is not necessary; you can always use the source tree to compile your artifacts into. However, this would clutter the source directory with many many files that the version control system knows nothing about. It would complain about all these files, and you would have to tell it to ignore them.
So, create a build directory. I use to create one in
(which belongs to me, in a Unix sense). (
jfasch-home is the name
of the project, and I like to name build roots after their sources.)
$ mkdir /var/jfasch/jfasch-home
Toolchain, CMake, etc.
$ sudo apt install build-essential cmake
$ sudo apt-get install libgtest-dev libgmock-dev
$ sudo dnf install gtest-devel gmock-devel
cmake to massage the many
CMakeLists.txt files in the
source tree, and generate a parallel build tree in
$ cd /var/jfasch/jfasch-home/ $ cmake ~/work/jfasch-home # ... for debug builds: $ cmake -DCMAKE_BUILD_TYPE=Release ~/work/jfasch-home
When successful (the project has a number of dependencies to external
cmake complains loudly when it cannot find them),
start the build.
Move that out of here, into a place which is central to the entire site. There’s going to come more.
Give a list of dependencies, and how to install them.
From a technical perspective, like build management, unittesting, and such. Definitely not from a Controller’s perspective.