From d992fa072abcfb3a88efc4c1fd2076dd7e1f0d75 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Sat, 19 Aug 2023 09:59:19 -0500 Subject: [PATCH] Adding POSITION_INDEPENDENT_CODE=ON to all HPX targets --- cmake/HPX_SetupTarget.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/HPX_SetupTarget.cmake b/cmake/HPX_SetupTarget.cmake index aec75f68959e..5b3f8c61950b 100644 --- a/cmake/HPX_SetupTarget.cmake +++ b/cmake/HPX_SetupTarget.cmake @@ -216,6 +216,8 @@ function(hpx_setup_target target) hpx_debug("setup_target.${target} UNITY_BUILD: OFF") endif() + set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON) + get_target_property(target_EXCLUDE_FROM_ALL ${target} EXCLUDE_FROM_ALL) if(target_EXPORT AND NOT target_EXCLUDE_FROM_ALL)