diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-10-24 19:51:10 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-10-24 19:51:10 -0700 |
commit | 703c9c2120effe49546097f4e5866251378f320c (patch) | |
tree | f8586619b1312cde75734bf6e9258e22498ac461 /rpcapd/CMakeLists.txt | |
parent | 392914eaf691f7cb0a80d59bffe090cffbab8b93 (diff) | |
download | libpcap-703c9c2120effe49546097f4e5866251378f320c.tar.gz |
Attempt to deal with OSes that require you to link with -lpthread.
Leave CMAKE_EXE_LINKER_FLAGS and CMAKE_SHARED_LINKER_FLAGS alone;
instead, just add SANITIZER_FLAGS as the LINK_FLAGS property to shared
library and executable targets.
Diffstat (limited to 'rpcapd/CMakeLists.txt')
-rw-r--r-- | rpcapd/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rpcapd/CMakeLists.txt b/rpcapd/CMakeLists.txt index a42eda79..0b59d140 100644 --- a/rpcapd/CMakeLists.txt +++ b/rpcapd/CMakeLists.txt @@ -71,6 +71,11 @@ if(WIN32 OR ((CMAKE_USE_PTHREADS_INIT OR PTHREADS_FOUND) AND HAVE_CRYPT)) set_target_properties(rpcapd PROPERTIES COMPILE_FLAGS ${C_ADDITIONAL_FLAGS}) endif() + if(NOT "${SANITIZER_FLAGS}" STREQUAL "") + set_target_properties(rpcapd PROPERTIES + LINK_FLAGS "${SANITIZER_FLAGS}") + endif() + # # By default, build rpcapd universal with the appropriate set of # architectures for the OS on which we're doing the build. |