Posts

Es werden Posts vom März, 2026 angezeigt.

Fighting with JSON — A Cpp War Story

  When an unknown compiler features drives you mad I was refactoring the build environment for an internal C++ project at work. To keep things simple, we used the following JSON library: https://github.com/nlohmann/json The build system was based on CMake. I planned to replace our wrapper scripts for CMake with a  preset.json . If you haven’t heard of this feature yet: when you want to set specific configurations for customers via CMake defines, you can predefine these in a dedicated preset file. It works surprisingly well. For my experimental render engine, I put all the Windows packages installation via vcpkg into a preset file like this: { "version" : 3, "configurePresets" : [ { "name" : "default" , "binaryDir" : " ${sourceDir} " , "cacheVariables" : { "CMAKE_TOOLCHAIN_FILE" : "contrib/vcpkg/scripts/buildsystems/vcpkg.cmake" ...