aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules/DefineCMakeDefaults.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/DefineCMakeDefaults.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)