From 9ad3d47d9567cf9f423ef59045b227ec16a34eb1 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 5 Apr 2023 15:18:00 +0200 Subject: [PATCH] CMakeLists.txt: Compile position independent code. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 295b339..3b39969 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,6 +92,12 @@ add_link_options( "$<$:$<$:-s>>" ) +include(CheckPIESupported) +check_pie_supported() +#cmake_policy(SET CMP0083 NEW) + +set( CMAKE_POSITION_INDEPENDENT_CODE TRUE ) + # Project config file configure_file(config.hpp.in "${PROJECT_BINARY_DIR}/config.hpp" @ONLY) include_directories(${PROJECT_BINARY_DIR})