CMake support by friendlyanon · Pull Request #44 · veselink1/refl-cpp (original) (raw)
I cleaned up things further.
Regarding the developer mode, you can just add a CMakeUserPresets.json file to the repo (but not checked in, so add it to gitignore) to have a convenient developer experience. Such a preset would allow you to trivially configure cmake:
{ "version": 1, "cmakeMinimumRequired": { "major": 3, "minor": 14, "patch": 0 }, "configurePresets": [ { "name": "dev", "displayName": "Developer mode", "description": "Developer mode", "generator": "Ninja", "binaryDir": "${sourceDir}/build", "cacheVariables": { "refl-cpp_DEVELOPER_MODE": "ON" } } ] }
With that presets file in place, configuring is simply done with running cmake --preset=dev in the source dir.
Version 3 will make the generator field optional in 3.21, so it'll be much easier to reuse presets. Could check a CMakePresets.json in after that.