Open 9fcc opened 7 years ago
It used only in C, so may be it would be better to rename library to "ccheck"? Or something like that.
I hear you. Sorry that it is tricky to find information on it. The library's first release was in 2001 (on Sourceforge). I think that changing the name of the project now may only add further confusion.
Although Check does provide both autoconf and CMake build systems, Check officially supports autoconf for Linux/OSX/BSD/Solaris/Hurd and officially support CMake for Windows. I am not enough of a CMake expert to say definitively that it is fool-proof on anything but Windows. If my understanding is correct, the issue is a naming conflict between "check" the library and "check" the testing target in CMake, right? Is there a way to prevent the issue normally by modifying how Check using CMake?
I never really knew why Ubuntu renamed the Check library to check_pic. I wonder if it was in part to avoid the naming conflicts, or if that was accidental.
The only solution is to change library name (maybe not the whole project but at least so-name).
It is very rare case because cmake doesn't have default check
target. But some people may added it like me through it was used often in past. Renaming the project could make problems but only for some time. This even library won't get popular even through google tests are easy to find and this library is hard to find example for.
By the way I know CMake well but I don't know autoconf so I'll try to get cmake files to usable state. For now check's cmake files work on linux but do minimal things. First I tried to make deb package using CMake but didn't found pkg-config info in resulting package.
There is another solution: Instead of renaming the library itself it suffices to rename the target (e.g. to libcheck
) and instead set the target property OUTPUT_NAME
to check
in order for the filename of the generated library to stay the same.
Default solution for
make check
in cmake is:But using compiled from source library produces errors:
So had to rename check target to tests-check.
Check was configured by cmake using pkg-config:
Default check library name in Ubuntu distribution is check_pic, so there was no problem before.
By the way "check" is too common word and associated to make check command so I've spent some time searching for that library in the past. It used only in C, so may be it would be better to rename library to "ccheck"? Or something like that.