Skip to content

Commit

Permalink
Merge pull request #1625 from timkpaine/tkp/threads
Browse files Browse the repository at this point in the history
add threads explicit on mac
  • Loading branch information
texodus authored Nov 22, 2021
2 parents 2994543 + 2767c64 commit 6d25383
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cpp/perspective/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,14 @@ elseif(PSP_CPP_BUILD OR PSP_PYTHON_BUILD)
# module_origin_path is the location of the binary
if(MACOS)
set(module_origin_path "@loader_path/")

# assume built-in pthreads on MacOS
set(CMAKE_THREAD_LIBS_INIT "-lpthread")
set(CMAKE_HAVE_THREADS_LIBRARY 1)
set(CMAKE_USE_WIN32_THREADS_INIT 0)
set(CMAKE_USE_PTHREADS_INIT 1)
set(THREADS_PREFER_PTHREAD_FLAG ON)

else()
set(module_origin_path "\$ORIGIN")
endif()
Expand Down

0 comments on commit 6d25383

Please sign in to comment.