[CMake] Use POSITION_INDEPENDENT_CODE property instead of manually setting -fPIC (Alchemy sync)

This commit is contained in:
Router Gray
2019-12-20 16:19:21 -06:00
parent 6608dd0b8d
commit 0496374328
9 changed files with 18 additions and 60 deletions

View File

@@ -46,14 +46,6 @@ set(llplugin_HEADER_FILES
set_source_files_properties(${llplugin_HEADER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
add_library (llplugin ${llplugin_SOURCE_FILES})
@@ -67,6 +59,8 @@ else()
)
endif()
set_target_properties(llplugin PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
add_subdirectory(slplugin)
# # Add tests