summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorpsychocrypt <psychocrypt@users.noreply.github.com>2017-11-01 08:53:40 +0100
committerpsychocrypt <psychocrypt@users.noreply.github.com>2017-11-01 08:53:40 +0100
commit56706805b4a4910151c4e0eab8bef7d7d0bf4d8d (patch)
tree5f56dcf2c097889b52aef937b6f46c4f345b8a59 /CMakeLists.txt
parent59a1531649fe0a8de38191771d0b12decfdea072 (diff)
downloadxmr-stak-56706805b4a4910151c4e0eab8bef7d7d0bf4d8d.zip
xmr-stak-56706805b4a4910151c4e0eab8bef7d7d0bf4d8d.tar.gz
add `CMAKE_POSITION_INDEPENDENT_CODE`
fix `/usr/bin/ld: bin/libxmr-stak-backend.a(jconf.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC`
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a1da75..09b7c13 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -358,6 +358,8 @@ endif()
include_directories(BEFORE .)
+set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
+
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# remove warnings that f_open() is not save and f_open_s should be used
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
OpenPOWER on IntegriCloud