mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +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:
@@ -5,13 +5,9 @@ set(MSGPACK_CMAKE_ARGS
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_GENERATOR=${CMAKE_GENERATOR}
|
||||
-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
${BUILD_TYPE_STRING})
|
||||
|
||||
if(NOT MSVC)
|
||||
list(APPEND MSGPACK_CMAKE_ARGS
|
||||
"-DCMAKE_C_FLAGS:STRING=-fPIC")
|
||||
endif()
|
||||
|
||||
if(USE_EXISTING_SRC_DIR)
|
||||
unset(MSGPACK_URL)
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user