1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
From: Chow Loong Jin <hyperair@debian.org>
Date: Sat, 28 Dec 2024 12:46:21 +0800
Subject: Set CMAKE_POSITION_INDEPENDENT_CODE to ON
Required to prevent relocation errors while linking
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 874e56b..ca4ae0f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,9 @@ include(cmake/ProjectVersion.cmake)
project(LibBGCode VERSION ${LibBGCode_VERSION})
+# Turn on position independent code
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
# Set C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|