CMake: Add -pthread compile option on posix platforms by Smjert · Pull Request #...
source link: https://github.com/osquery/osquery/pull/6909
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
osquery was already linking with -pthread and so linking
to libpthread on Linux, but it wasn't always defining
the _REENTRANT macro which is done by the -pthread option
given at compile time.
Although in the third party libraries that need it,
it should've been defined in other ways (directly or via a config.h),
always add -pthread for correctness and consistency.
Note: macOS doesn't need -pthread at link time because
pthreads are already implemented inside the libc library.
Recommend
-
11
add_compile_options¶ Add options to the compilation of source files. add_compile_options(<option> ...)
-
7
target_compile_options¶ Add compile options to a target. target_compile_options(<target> [BEFORE]...
-
5
How to compile Open Scene Graph 3.2 with Qt 5.1 and CMake advertisements I already compiled Open Scene Graph 3.2 against Qt4. I managed it thr...
-
6
wabt-sys compile: error: CMAKE_PROJECT_VERSION was not declared in this scope on Ubuntu 18.04 LTS ...
-
1
Copy link Member Smjert co...
-
3
Copy link Member Smjert com...
-
6
Copy link Member Smjert commented...
-
4
New issue Restore query packs in Windows packaging #7388
-
7
New issue Change libdpkg submodule url to our own github mirror #6903
-
5
Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake Download and Install Emscripten My preferred installation location is /home/user Get the latest sdk: git...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK