Closed friendlyanon closed 3 years ago
Any updates?
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:
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.
Thank you for your work on this!
I am not very familiar with CMake, and I was hoping to have the time to become familiar enough to evaluate any tradeoffs. Months later, I still haven't done that.
Everything up to your latest changes is in the cmake-support branch (which is now several commits behind). I just forgot to follow up on that here. My intention was to bring that branch up to date and finally close this PR.
I'm not able to test the presets option, as my system (Ubuntu 20.04) only comes with CMake 3.16 and --preset
was added in CMake 3.20, if not mistaken. Building with -Drefl-cpp_DEVELOPER_MODE=ON
instead works fine, so I trust nothing has been broken.
I will now proceed to set up the CI to build with CMake and finally merge this PR sometime in the next day.
Merged into master, everything looks good. Thanks, @friendlyanon!
Presets were added in 3.19 and Kitware provides an APT repository for Debian based distros to always get the latest and greatest, so it's trivial to install new versions. I highly recommend always using the latest version, even if your CMLs don't require such high versions, purely because of all the QoL changes, like presets.
This PR enables clients using CMake to consume this library in a trivial manner.
For rationale behind the changes, please look at my recent PRs and discussions in FunctionalPlus, where I added similar support.