From 04e0d57dc1272390eee711f354e3a6879855d7b2 Mon Sep 17 00:00:00 2001 From: Lunkhound Date: Fri, 16 Mar 2018 23:42:43 -0700 Subject: [PATCH] add premake option 'enable-multithreading' --- build3/premake4.lua | 8 ++++++++ src/LinearMath/premake4.lua | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build3/premake4.lua b/build3/premake4.lua index a39e926e5..d49b9d440 100644 --- a/build3/premake4.lua +++ b/build3/premake4.lua @@ -182,6 +182,14 @@ end trigger = "audio", description = "Enable audio" } + newoption + { + trigger = "enable_multithreading", + description = "enable CPU multithreading for bullet2 libs" + } + if _OPTIONS["enable_multithreading"] then + defines {"BT_THREADSAFE=1"} + end if _OPTIONS["double"] then defines {"BT_USE_DOUBLE_PRECISION"} end diff --git a/src/LinearMath/premake4.lua b/src/LinearMath/premake4.lua index 5f0fda6bf..3765811a9 100644 --- a/src/LinearMath/premake4.lua +++ b/src/LinearMath/premake4.lua @@ -9,5 +9,7 @@ } files { "*.cpp", - "*.h" + "*.h", + "TaskScheduler/*.cpp", + "TaskScheduler/*.h" }