aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-10-02 14:44:25 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-10-02 14:48:02 +0200
commitf09ca85ebf44d56a2476bfffeabb6c4dfc90387c (patch)
treefbe6a4b5f3961a9d80ef1b5e01b0be7e92f74de9 /cmake
parent096d966e4314c9fbc76f2e16ee2e9523608c4907 (diff)
downloadlibssh-f09ca85ebf44d56a2476bfffeabb6c4dfc90387c.tar.gz
libssh-f09ca85ebf44d56a2476bfffeabb6c4dfc90387c.tar.xz
libssh-f09ca85ebf44d56a2476bfffeabb6c4dfc90387c.zip
cmake: Always build position independent code
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/DefineCMakeDefaults.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/Modules/DefineCMakeDefaults.cmake b/cmake/Modules/DefineCMakeDefaults.cmake
index ab0538bf..ef4fb337 100644
--- a/cmake/Modules/DefineCMakeDefaults.cmake
+++ b/cmake/Modules/DefineCMakeDefaults.cmake
@@ -16,3 +16,6 @@ set(CMAKE_COLOR_MAKEFILE ON)
# Create the compile command database for clang by default
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
+# Always build with -fPIC
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)