cmake: exclude -pthread from Emscripten default build

pull/20350/head
Alexander Alekhin 4 years ago
parent 3b26105f68
commit 0e523618a1
  1. 8
      cmake/OpenCVCompilerOptions.cmake

@ -177,7 +177,13 @@ if(CV_GCC OR CV_CLANG)
endif()
# We need pthread's
if(UNIX AND NOT ANDROID AND NOT (APPLE AND CV_CLANG)) # TODO
if((UNIX
AND NOT ANDROID
AND NOT (APPLE AND CV_CLANG)
AND NOT EMSCRIPTEN
)
OR (EMSCRIPTEN AND WITH_PTHREADS_PF) # https://github.com/opencv/opencv/issues/20285
)
add_extra_compiler_option(-pthread)
endif()

Loading…
Cancel
Save