Python’s duck typing is most of the time sufficient for implementing clean interfaces. However, often there comes a need to vary the implementation based on the received type and isinstance may leed to brittle design, that doesn’t allow for extensibility. This is where the functools.singledispatch decorator comes in.
CMake Fundamentals Part 9
Once you’ve defined that installation process for your project, packaging it into an archive or a proper distribution is the next step that you may want to consider. In this part of the series, I introduce the basics of CPack – CMake’s support for packaging.
CMake Managing Resources
Not everything within your project tree is a source file that your compiler cares about, Invetiebly you’ll have some resources like .json configuration files, or similar. In this post, I discuss why it’s a good idea to make your build system aware of these resources and present a solution on how to do so.
CMake Fundamentals Part 8
Continuing the subject of installing projects. This time I discuss details related to shared libraries
CMake FetchContent
If it isn’t already, FetchContent should be your go-to solution for managing all non-binary dependencies. Forget git submodules, use FetchContent instead.
Lambdas under the hood
Lambdas are no longer a new C++ feature – it’s been 10 years since they have been introduced. In this post, I attempt to clear up some common, in my experience, misconceptions by explaining the basics of their inner workings.
CMake Fundamentals Part 7
Once you’re done developing your shiny new library you better make sure that people can painlessly include it into their projects. In this part of the CMake Fundamentals series I demonstrate how to package and install libraries.
CMake Lists
It’s time to talk about CMake lists. The most obvious example of the lack of a type system in CMake.
CMake Fundamentals Part 6
Testing is an important consideration that needs to be made when setting up a C++ project. In this part of the series, I demonstrate how to do this using googletest and CTest.
CMake Generator-Expressions
Generator-expressions are a relatively new addition to the CMake language. The syntax may be a little off-putting at first, but once you get used to it, it becomes the go-to solution in many scenarios.