mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Compile nnpack and pthreadpool with -fPIC
Summary: Closes https://github.com/caffe2/caffe2/pull/1428 Reviewed By: Maratyszcza Differential Revision: D6240390 Pulled By: pietern fbshipit-source-id: 6d441bbfda81ce79e3c824ec28eec0b2cdd8c7cd
This commit is contained in:
committed by
Facebook Github Bot
parent
5616d41421
commit
1021402136
4
cmake/External/nnpack.cmake
vendored
4
cmake/External/nnpack.cmake
vendored
@ -53,6 +53,10 @@ if (ANDROID OR IOS OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NA
|
||||
add_subdirectory(
|
||||
"${NNPACK_PREFIX}"
|
||||
"${CONFU_DEPENDENCIES_BINARY_DIR}")
|
||||
# We build static versions of nnpack and pthreadpool but link
|
||||
# them into a shared library for Caffe2, so they need PIC.
|
||||
set_property(TARGET nnpack PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
set_property(TARGET pthreadpool PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
|
||||
set(NNPACK_FOUND TRUE)
|
||||
|
Reference in New Issue
Block a user