MantisBT - CMake |
| View Issue Details |
|
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0014767 | CMake | Modules | public | 2014-02-20 13:32 | 2015-04-06 09:07 |
|
| Reporter | zub | |
| Assigned To | Rolf Eike Beer | |
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | |
| Platform | | OS | linux | OS Version | |
| Product Version | CMake 2.8.12.2 | |
| Target Version | | Fixed in Version | | |
|
| Summary | 0014767: 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 [^] |
| Tags | No tags attached. |
| Relationships | | child of | 0014049 | closed | Rolf Eike Beer | FindThreads.cmake: several small bugs |
|
| Attached Files | |
|
| Issue History |
| Date Modified | Username | Field | Change |
| 2014-02-20 13:32 | zub | New Issue | |
| 2014-02-21 08:26 | Brad King | Note Added: 0035164 | |
| 2014-10-06 15:46 | Rolf Eike Beer | Relationship added | child of 0014049 |
| 2014-10-06 15:54 | Rolf Eike Beer | Note Added: 0036986 | |
| 2014-10-06 15:54 | Rolf Eike Beer | Assigned To | => Rolf Eike Beer |
| 2014-10-06 15:54 | Rolf Eike Beer | Status | new => resolved |
| 2014-10-06 15:54 | Rolf Eike Beer | Resolution | open => fixed |
| 2015-04-06 09:07 | Robert Maynard | Note Added: 0038419 | |
| 2015-04-06 09:07 | Robert Maynard | Status | resolved => closed |