The following issue has been SUBMITTED. ====================================================================== http://www.cmake.org/Bug/view.php?id=14767 ====================================================================== Reported By: zub Assigned To: ====================================================================== Project: CMake Issue ID: 14767 Category: Modules Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2014-02-20 13:32 EST Last Modified: 2014-02-20 13:32 EST ====================================================================== Summary: FindThreads.cmake prefers -lpthread over -pthread with GCC Description: With gcc on Linux, FindThreads.cmake finds out that "-lpthread" works and sticks to that.
Reading gcc man page, I think "-pthread" should be preferred, as it does the right thing: -pthread Adds support for multithreading with the pthreads library. This option sets flags for both the preprocessor and linker. Too bad that the actual gcc doc doesn't say much about -pthread: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16519 Steps to Reproduce: Build a simple project that includes FindThreads. Additional Information: The same issue has been brought up before: http://www.cmake.org/pipermail/cmake/2012-December/052963.html ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2014-02-20 13:32 zub New Issue ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
