Skip to content

Commit

Permalink
add cmake option to fall back on the fiber api do detect thread termi…
Browse files Browse the repository at this point in the history
…nation on windows
  • Loading branch information
daanx committed Oct 22, 2024
1 parent aa88173 commit 4377abe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ option(MI_NO_THP "Disable transparent huge pages support on Linux/And
option(MI_EXTRA_CPPDEFS "Extra pre-processor definitions (use as `-DMI_EXTRA_CPPDEFS=\"opt1=val1;opt2=val2\"`)" "")

# deprecated options
option(MI_WIN_USE_FLS "Use Fiber local storage on Windows to detect thread termination" OFF)
option(MI_CHECK_FULL "Use full internal invariant checking in DEBUG mode (deprecated, use MI_DEBUG_FULL instead)" OFF)
option(MI_USE_LIBATOMIC "Explicitly link with -latomic (on older systems) (deprecated and detected automatically)" OFF)

Expand Down Expand Up @@ -313,6 +314,11 @@ if(MI_LIBC_MUSL)
list(APPEND mi_defines MI_LIBC_MUSL=1)
endif()

if(MI_WIN_USE_FLS)
message(STATUS "Use the Fiber API to detect thread termination")
list(APPEND mi_defines MI_WIN_USE_FLS=1)
endif()

# On Haiku use `-DCMAKE_INSTALL_PREFIX` instead, issue #788
# if(CMAKE_SYSTEM_NAME MATCHES "Haiku")
# SET(CMAKE_INSTALL_LIBDIR ~/config/non-packaged/lib)
Expand Down

0 comments on commit 4377abe

Please sign in to comment.