use -lpthreads instead of -pthreads
Open
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.8k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
https://github.com/google/benchmark/blob/0811f1d782455b3c80285bebf934a7045d845ed3/src/CMakeLists.txt#L42
target_link_libraries(benchmark -lpthreads)
NAG Fortran Compiler had the compile flag -pthread in Version < 6.0.
Using a recent version with cmake ends up having -pthread in the linker command, which results in the error:
nagfor 6.2:
"Option error: Unrecognised option -pthread"
Using -lpthreads instead is working fine.
Closed cmake issue: https://gitlab.kitware.com/cmake/cmake/issues/20103#note_670921
Contributor guide
Assessment
This issue has not been assessed yet.