-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake support #44
CMake support #44
Conversation
Any updates? |
Developer mode allows proper separation of concerns by making targets available only for the developer(s) of the library that are only relevant to the developer(s) of the library.
299f0de
to
1c1585c
Compare
I cleaned up things further. Regarding the developer mode, you can just add a {
"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 |
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 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. |
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.