[CMake] Use POSITION_INDEPENDENT_CODE property instead of manually setting -fPIC (Alchemy sync)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user