commit | 350b905537f59323a6b9a854cf019e8e95940bd6 | [log] [tgz] |
---|---|---|
author | Adrian Johnson <ajohnson@redneon.com> | Mon Oct 02 11:36:42 2017 +1030 |
committer | Adrian Johnson <ajohnson@redneon.com> | Sat Oct 21 21:02:25 2017 +1030 |
tree | f63ad0ca184b5c750a2de5a459b33871b4c61f7d | |
parent | e01e6db4e0643b7b318a3d7dc49442bb2d6ade00 [diff] |
Use -pthread flag instead of -lpthread The -pthread flag should be used for compiling with threads as it sets flags for both the preprocessor and linker. In cmake this is achieved with the set(THREADS_PREFER_PTHREAD_FLAG TRUE) before find_package(Threads) and using the Threads::Threads import target. Also added set(CMAKE_THREAD_PREFER_PTHREAD TRUE) as we only support pthread on non windows platforms.