From feed1b305f27b8c90573898a18f7b0ef37323921 Mon Sep 17 00:00:00 2001 From: EndrII Date: Sat, 22 Jan 2022 00:28:25 +0300 Subject: [PATCH] disable default contrictor for argument because python use the static object. --- BuildBotLib/basemodule.py | 2 +- BuildBotLib/cmake.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/BuildBotLib/basemodule.py b/BuildBotLib/basemodule.py index fe39a9c..0ad0a72 100644 --- a/BuildBotLib/basemodule.py +++ b/BuildBotLib/basemodule.py @@ -97,7 +97,7 @@ class BaseModule: return 'make' - def makeTarget(self, target, cxxFlags=[]): + def makeTarget(self, target, cxxFlags=None): command = [self.make()] return command + [target] diff --git a/BuildBotLib/cmake.py b/BuildBotLib/cmake.py index cda839b..50f8526 100644 --- a/BuildBotLib/cmake.py +++ b/BuildBotLib/cmake.py @@ -15,7 +15,7 @@ class CMake(Make): def makePrefix(self): return "C" - def makeTarget(self, target, cxxFlags=[]): + def makeTarget(self, target, cxxFlags=None): command = 'cmake --build cmake_build --config Release' if len(target): @@ -25,7 +25,9 @@ class CMake(Make): if cpus: command += ' --parallel ' + str(cpus) - cxx = cxxFlags + cxx = [] + if cxxFlags is not None: + cxx += cxxFlags if self.isiOS(''): cxx += ['-allowProvisioningUpdates']