aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-10-23 21:46:39 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-10-23 21:46:39 +0100
commit575aa943606aa2f946f407c663259d70d4a87ffb (patch)
tree976612ec5c0e1ed28083409cef4a951135a2dd04 /CMakeLists.txt
parent96b94707c1c6fde1cc2aa06522587114c5c6c809 (diff)
downloadrspamd-575aa943606aa2f946f407c663259d70d4a87ffb.tar.gz
rspamd-575aa943606aa2f946f407c663259d70d4a87ffb.zip
[Minor] Some tweaks to the cmake scripts
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 571a09166..835f56039 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -402,6 +402,11 @@ ELSE(HAVE_PCRE_JIT_FAST)
ENDIF(HAVE_PCRE_JIT_FAST)
ENDIF()
+CHECK_C_COMPILER_FLAG(-fPIC SUPPORT_FPIC)
+IF(SUPPORT_FPIC)
+ ADD_COMPILE_OPTIONS("-fPIC")
+ENDIF(SUPPORT_FPIC)
+
FILE(WRITE ${CMAKE_BINARY_DIR}/pthread_setpshared.c "
#include <pthread.h>
#include <stdlib.h>