mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
build: use CMAKE_POSITION_INDEPENDENT_CODE instead of -fPIC (#21947)
It's simpler to let cmake figure out what flags to add to each platforms to create position independent code rather than handling it ourselves. Also remove code that sets POSITION_INDEPENDENT_CODE property on SHARED and MODULE libraries, as it's already on by default.
This commit is contained in:
@@ -861,7 +861,6 @@ endif()
|
||||
set_target_properties(
|
||||
libnvim
|
||||
PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
OUTPUT_NAME ${LIBNVIM_NAME}
|
||||
)
|
||||
target_compile_definitions(libnvim PRIVATE MAKE_LIB)
|
||||
@@ -885,11 +884,6 @@ else()
|
||||
target_link_libraries(nvim-test PRIVATE "-framework CoreServices")
|
||||
endif()
|
||||
target_include_directories(nvim-test PRIVATE ${LUAJIT_INCLUDE_DIRS})
|
||||
set_target_properties(
|
||||
nvim-test
|
||||
PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
)
|
||||
target_compile_definitions(nvim-test PRIVATE UNIT_TESTING)
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user