[CMake] Updated FindThreads.cmake in tracker
Hendrik Sattler
post at hendrik-sattler.de
Tue Sep 22 03:44:53 EDT 2009
Zitat von Philip Lowman <philip at yhbt.com>:
> So the gist of it is, if your only Unix compiler is gcc and if you add
> "-pthread" to your CMAKE_C_FLAGS/CMAKE_CXX_FLAGS you really have no need for
> FindThreads at all, as far as I can tell.
But cmake is not only about gcc. Additionally, gcc > 3.0 is mentioned,
gcc-2.95 may still be in use somewhere.
So, testing for -pthread if gcc > 3.0 is used should be the first
action in FindThreads.cmake. OTOH, this is so compiler and platform
specific, it should go with the normal compiler and platform files.
There, it could be a simple define instead of testing -> much faster.
HS
More information about the CMake
mailing list