Skip to content

Commit ffed5e9

Browse files
committed
Propagate the Position Independent Code flag (#957)
1 parent 1d1bba1 commit ffed5e9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/external_rules.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ function(build_external_dependencies)
240240
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
241241
endif()
242242
endif()
243+
# Propagate the PIC setting, as the dependencies need to match it
244+
set(CMAKE_SUB_CONFIGURE_OPTIONS ${CMAKE_SUB_CONFIGURE_OPTIONS}
245+
-DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE})
243246
message(STATUS "Sub-configure options: ${CMAKE_SUB_CONFIGURE_OPTIONS}")
244247
message(STATUS "Sub-build options: ${CMAKE_SUB_BUILD_OPTIONS}")
245248

0 commit comments

Comments
 (0)