#1611 Cmake check for std::thread is buggy.
Metadata
Property | Value |
---|---|
Reported by | Dominic Kempf (dominic.r.kempf@gmail.com) |
Reported at | Apr 9, 2015 11:48 |
Type | Bug Report |
Version | 2.3 |
Operating System | Unspecified / All |
Last edited by | Uli Sack (usack@math.fu-berlin.de) |
Last edited at | Apr 24, 2015 14:45 |
Closed by | Uli Sack (usack@math.fu-berlin.de) |
Closed at | Apr 24, 2015 14:45 |
Closed in version | Unknown |
Resolution | Fixed |
Comment | False alarm. Current master works also with cmake 3.2.2 |
Description
On a vanilla Ubuntu 14.04, g++ 4.8.2, cmake 2.8.12 I get your error message:
Your system does not seem to have a working implementation of std::thread....
I do however think that this should REALLY work out of the box for such standard system.
Investigating the issue, I found out that it uses -lpthread, instead of -pthread. The only way to make it work, that I found until now is the following: Use a cmake version (here: git master, dont know exactly when the feature was introduced) where the module FindThreads.cmake can be customized by setting THREADS_PREFER_PTHREAD_FLAG and do so.
One way of solving the issue would be to copy and ship the new version of this test and set that switch automatically.