From b197fc20796494fca03162fd2735821a3bd5bc86 Mon Sep 17 00:00:00 2001 From: jfons Date: Tue, 28 Sep 2021 11:59:56 +0200 Subject: Force optimized builds for thirdparty Embree files --- methods.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'methods.py') diff --git a/methods.py b/methods.py index 50b413a0e6..0e71adb40d 100644 --- a/methods.py +++ b/methods.py @@ -56,6 +56,17 @@ def disable_warnings(self): self.Append(CXXFLAGS=["-w"]) +def force_optimization_on_debug(self): + # 'self' is the environment + if self["target"] != "debug": + return + + if self.msvc: + self.Append(CCFLAGS=["/O2"]) + else: + self.Append(CCFLAGS=["-O3"]) + + def add_module_version_string(self, s): self.module_version_string += "." + s -- cgit v1.2.3