File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -223,12 +223,6 @@ if(EXECUTORCH_BUILD_PTHREADPOOL)
223
223
set (PTHREADPOOL_SOURCE_DIR
224
224
"${CMAKE_CURRENT_LIST_DIR} /backends/xnnpack/third-party/pthreadpool"
225
225
)
226
- if (APPLE )
227
- set (PTHREADPOOL_SYNC_PRIMITIVE
228
- "condvar"
229
- CACHE STRING ""
230
- )
231
- endif ()
232
226
include (ExternalProject )
233
227
include (GNUInstallDirs )
234
228
set (PTHREADPOOL_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR} /pthreadpool" )
@@ -237,6 +231,11 @@ if(EXECUTORCH_BUILD_PTHREADPOOL)
237
231
"${PTHREADPOOL_INSTALL_DIR} /${CMAKE_INSTALL_LIBDIR} /libpthreadpool.a"
238
232
)
239
233
get_extra_cmake_args_for_external_project (PTHREADPOOL_EXTRA_CMAKE_ARGS )
234
+ if (APPLE )
235
+ list (APPEND PTHREADPOOL_EXTRA_CMAKE_ARGS -D
236
+ PTHREADPOOL_SYNC_PRIMITIVE=condvar
237
+ )
238
+ endif ()
240
239
ExternalProject_Add (
241
240
pthreadpoolExternalProject
242
241
SOURCE_DIR "${PTHREADPOOL_SOURCE_DIR} "
@@ -253,8 +252,6 @@ if(EXECUTORCH_BUILD_PTHREADPOOL)
253
252
-D
254
253
PTHREADPOOL_ALLOW_DEPRECATED_API=ON
255
254
-D
256
- PTHREADPOOL_SYNC_PRIMITVE=${PTHREADPOOL_SYNC_PRIMITIVE}
257
- -D
258
255
CMAKE_POSITION_INDEPENDENT_CODE =ON
259
256
-D
260
257
CMAKE_INSTALL_PREFIX =<INSTALL_DIR>
You can’t perform that action at this time.
0 commit comments