enable/disable threadpool from cmake

This commit is contained in:
2026-03-04 20:45:25 +01:00
parent cc2aee3af4
commit a9c102298a
4 changed files with 12 additions and 5 deletions

View File

@ -9,6 +9,7 @@ if(POLICY CMP0167)
cmake_policy(SET CMP0167 NEW)
endif()
option(DISABLE_THREADPOOL "Disable additional physics threads" OFF)
option(DISABLE_BACKWARD "Disable backward stacktrace printer" OFF)
option(DISABLE_TRACY "Disable the Tracy profiler client" OFF)
option(DISABLE_TESTS "Disable building tests" OFF)
@ -41,6 +42,10 @@ if(WIN32)
list(APPEND LIBS opengl32 gdi32 winmm)
endif()
if(NOT DISABLE_THREADPOOL)
list(APPEND FLAGS THREADPOOL)
endif()
if(NOT DISABLE_BACKWARD)
find_package(Backward REQUIRED)
@ -127,4 +132,4 @@ if(supported)
set_property(TARGET masssprings PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
else()
message(STATUS "IPO / LTO not supported")
endif()
endif()