[cmake-developers] Checking for -pthread before -lpthread{s} in FindThreads.cmake
Raphael Kubo da Costa
kubito at gmail.com
Sat Apr 16 21:23:39 EDT 2011
Hello there,
I see that currently FindThreads.cmake checks for -lpthreads, -lpthread
and -lthread before trying to compile code with -pthread.
FreeBSD explicitly recommends using -pthread [1], and I guess the same
holds for at least gcc-based systems, where -pthread usually translates
into automatically passing -lpthread and any necessary definitions to
the compiler and the linker.
Is the current order of the checks intentional, or would a patch
changing the checks be accepted? Depending on the patch implementation,
this would probably fix CMake bug #7830 as a side-effect.
Cheers,
Raphael
More information about the cmake-developers
mailing list