aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
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>