Setting up the development environment
One of my goals for this project is to build it with open-source libraries:
- Gain experience with a variety of open-source libraries for cross-platform development.
Another goal is to practice my skills in modern C++:
- Have a project with which I can practice more modern C++.
Both of these goals pose some interesting constraints on the development environment.
For starters, sourcing all the libraries is a problem to solve. Fortunately, in recent years a variety of package managers for C++ have emerged, for example Conan and vcpkg. Choosing a package manager is to some degree a matter of preference. However, Conan has a prerequisite of requiring a Python interpreter, and for this project I’d like to keep any such up-front requirements to a minimum. Therefore, the choice here is vcpkg.
Secondly, since cross-platform is desired, the project needs a build system that supports both. On this front, CMake has become a de-facto standard for C++ projects. There are others, of course - for example Meson, Scons, or Bazel. But none of those seem to be as widely adopted as CMake, so this project will use that.
Thirdly, a build system needs a compiler. Now, while CMake enables us to more or less freely choose a compiler, then there is a question of which compiler is best suited for modern C++. According to cppreference.com’s overview for compiler support the best choices are GCC and Clang, with MSVC lagging a little bit, but not that far, behind. Fortunately, the two best choices are also available for multiple platforms. Therefore, it is natural that one of them should become the compiler of choice. For this project specifically, the choice is Clang. Even though, on Windows Clang still requires a separate installation of the Windows SDK.
To sum it all up, these are the three corner-stone tools for the C++ development part of this project:
- vcpkg to manage open-source project dependencies
- CMake for building the project
- Clang as the compiler infrastructure