Skip to content

Commit

Permalink
feat(cmake): fix android cmake build issue
Browse files Browse the repository at this point in the history
detail: NDK do not support find_package(Threads)
but NDK support threads!

FIXME: compnode support NON-cpu compnode on no support threads env

FXIME: may have issue if ANDROID support CUDA, need fix it
if need support this case
GitOrigin-RevId: 19af74a6af07c541503fc46031d84676cc948b29
  • Loading branch information
megvii-mge committed Apr 8, 2021
1 parent 2df8475 commit 610fecc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ if(MSVC OR WIN32)
set(THREADS_PREFER_PTHREAD_FLAG ON)
endif()

if(CMAKE_THREAD_LIBS_INIT OR CMAKE_USE_WIN32_THREADS_INIT)
if(CMAKE_THREAD_LIBS_INIT OR CMAKE_USE_WIN32_THREADS_INIT OR ANDROID)
set(MGB_HAVE_THREAD 1)
endif()

Expand Down

0 comments on commit 610fecc

Please sign in to comment.