-
Notifications
You must be signed in to change notification settings - Fork 925
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
Add support for cmake #225
Comments
The only Makefiles that exist in the repo today are in |
Sorry If I did not explain it clearly the integration is indeed trivial the installation is nonintuitive. Anyway I will provide a patch in the next days and open a PR. Thanks for the fast response. |
CMake may be too huge for this beautiful project itself. Probably uthash project can describe itself with minimal CMake manifest file.
If so, consumer project of this library can use it by following snippet.
Once this snippet is added, there is no need for manually copying the headers. :D There are some benefits for direct and indirect consumer of uthash by adopting this. First, when updating uthash library, we only need to update the GIT_TAG anchor, Second, by the mechanism of CMake, there will only be one copy of uthash even if
If A and B both using CMake (and depend uthash as described above), only one copy of I have a fork of uthash and a simple repo to demonstrate the client side usage. |
Some additional considerations: Whether to introduce another folder layer, e.g. require user to |
Although I originally opened this issue, I agree with @Quuxplusone, CMake is not needed for uthash, it is header only, and it is trivial to use in any project either as a dependency in the build system, or through a system package. If you are a CMake user you can use it like this link(search uthash in the file) and it is really close to the solution you provided @wdhongtw. You can even just download the file and store it in your project, this solves all the build system issues (given that the code is updated infrequently). |
I have been using uthash lately in several projects that all use CMake. The project's header-only nature is easy to use and integrate, but problems arise when installing the projects depending on uthash in a system. I want to ask if I could work on a PR that would add basic support for CMake for the project and incrementally make it complementary or replace completely Makefiles existing in some directories.
The text was updated successfully, but these errors were encountered: