Pithikos / C-Thread-Pool

A minimal but powerful thread pool in ANSI C
MIT License
2.06k stars 603 forks source link

Added CMake support. #50

Closed GandaG closed 7 years ago

GandaG commented 7 years ago

Added support to building this library with cmake. I left it clear in the readme that it is still preferred to build the sources into the user's project but for other projects using cmake it is much easier to integrate this library this way.

I don't know much about windows so I left it at the user's discretion to grab the appropriate library from pthreads-win32 and to get the proper build commands from cmake docs. If preferred I can try to get the appropriate library from pthreads-win32 and try to learn the build commands for windows, though this will take some time. On every other platform (or if the user is using Mingw32/cygwin) the process is exactly what is in the readme.

The added gitignore file is a mixture of the default C gitignote and the default CMake gitignore files from github.

Pithikos commented 7 years ago

Thanks for the work GandaG!

I have quite limited time atm to test this. I will wait for someone else to comment on this or else I will have a closer look at a later stage when I'm more free.

GandaG commented 7 years ago

Well, since then I've figured out cmake can just download the two files directly, which makes it even simpler than building the library.

I'll leave it up to you on whether to close this. I'd honestly only merge if you intended to have either more files (in which case downloading them individually becomes burdensome) or if you feel building into a library is helpful.

Pithikos commented 7 years ago

I will close this for the moment being. If you wish to re-open it in the future feel free to do so.

Thanks for the work in any case!