Skip to content

Commit

Permalink
replace find and append with consistent USE_* flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Elijah Rippeth committed Oct 15, 2020
1 parent b6fe841 commit e62256e
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions android/pytorch_android/CMakeLists.txt
Expand Up @@ -122,11 +122,6 @@ if(ANDROID_ABI)
libclog
)
else()
find_package(nnpack)
find_package(XNNPACK)
find_package(pthreadpool)
find_package(pytorch_qnnpack)

# Prefer dynamic linking on the host
set(pytorch_jni_LIBS
fbjni
Expand All @@ -137,19 +132,19 @@ else()
clog
)

if(nnpack_FOUND)
if(USE_NNPACK)
list(APPEND pytorch_jni_LIBS nnpack)
endif()

if(XNNPACK_FOUND)
if(USE_XNNPACK)
list(APPEND pytorch_jni_LIBS XNNPACK)
endif()

if(pthreadpool_FOUND)
if(USE_SYSTEM_PTHREADPOOL)
list(APPEND pytorch_jni_LIBS pthreadpool)
endif()

if(pytorch_qnnpack_FOUND)
if(USE_PYTORCH_QNNPACK)
list(APPEND pytorch_jni_LIBS pytorch_qnnpack)
endif()

Expand Down

0 comments on commit e62256e

Please sign in to comment.