31
31
32
32
def build_project (src_path , build_path , target , toolchain_name ,
33
33
libraries_paths = None , options = None , linker_script = None ,
34
- clean = False , notify = None , verbose = False , name = None , macros = None , inc_dirs = None ):
34
+ clean = False , notify = None , verbose = False , name = None , macros = None , inc_dirs = None , jobs = 1 ):
35
35
""" This function builds project. Project can be for example one test / UT """
36
36
# Toolchain instance
37
37
toolchain = TOOLCHAIN_CLASSES [toolchain_name ](target , options , notify , macros )
38
38
toolchain .VERBOSE = verbose
39
+ toolchain .jobs = jobs
39
40
toolchain .build_all = clean
40
41
src_paths = [src_path ] if type (src_path ) != ListType else src_path
41
42
@@ -90,7 +91,7 @@ def build_project(src_path, build_path, target, toolchain_name,
90
91
91
92
def build_library (src_paths , build_path , target , toolchain_name ,
92
93
dependencies_paths = None , options = None , name = None , clean = False ,
93
- notify = None , verbose = False , macros = None , inc_dirs = None ):
94
+ notify = None , verbose = False , macros = None , inc_dirs = None , jobs = 1 ):
94
95
""" src_path: the path of the source directory
95
96
build_path: the path of the build directory
96
97
target: ['LPC1768', 'LPC11U24', 'LPC2368']
@@ -110,6 +111,7 @@ def build_library(src_paths, build_path, target, toolchain_name,
110
111
# Toolchain instance
111
112
toolchain = TOOLCHAIN_CLASSES [toolchain_name ](target , options , macros = macros , notify = notify )
112
113
toolchain .VERBOSE = verbose
114
+ toolchain .jobs = jobs
113
115
toolchain .build_all = clean
114
116
115
117
# The first path will give the name to the library
@@ -166,7 +168,7 @@ def build_lib(lib_id, target, toolchain, options=None, verbose=False, clean=Fals
166
168
167
169
168
170
# We do have unique legacy conventions about how we build and package the mbed library
169
- def build_mbed_libs (target , toolchain_name , options = None , verbose = False , clean = False , macros = None , notify = None ):
171
+ def build_mbed_libs (target , toolchain_name , options = None , verbose = False , clean = False , macros = None , notify = None , jobs = 1 ):
170
172
""" Function returns True is library was built and false if building was skipped """
171
173
# Check toolchain support
172
174
if toolchain_name not in target .supported_toolchains :
@@ -178,6 +180,7 @@ def build_mbed_libs(target, toolchain_name, options=None, verbose=False, clean=F
178
180
# Toolchain
179
181
toolchain = TOOLCHAIN_CLASSES [toolchain_name ](target , options , macros = macros , notify = notify )
180
182
toolchain .VERBOSE = verbose
183
+ toolchain .jobs = jobs
181
184
toolchain .build_all = clean
182
185
183
186
# Source and Build Paths
@@ -296,10 +299,11 @@ def get_target_supported_toolchains(target):
296
299
return TARGET_MAP [target ].supported_toolchains if target in TARGET_MAP else None
297
300
298
301
299
- def static_analysis_scan (target , toolchain_name , CPPCHECK_CMD , CPPCHECK_MSG_FORMAT , options = None , verbose = False , clean = False , macros = None , notify = None ):
302
+ def static_analysis_scan (target , toolchain_name , CPPCHECK_CMD , CPPCHECK_MSG_FORMAT , options = None , verbose = False , clean = False , macros = None , notify = None , jobs = 1 ):
300
303
# Toolchain
301
304
toolchain = TOOLCHAIN_CLASSES [toolchain_name ](target , options , macros = macros , notify = notify )
302
305
toolchain .VERBOSE = verbose
306
+ toolchain .jobs = jobs
303
307
toolchain .build_all = clean
304
308
305
309
# Source and Build Paths
@@ -420,7 +424,7 @@ def static_analysis_scan_lib(lib_id, target, toolchain, cppcheck_cmd, cppcheck_m
420
424
421
425
def static_analysis_scan_library (src_paths , build_path , target , toolchain_name , cppcheck_cmd , cppcheck_msg_format ,
422
426
dependencies_paths = None , options = None , name = None , clean = False ,
423
- notify = None , verbose = False , macros = None ):
427
+ notify = None , verbose = False , macros = None , jobs = 1 ):
424
428
""" Function scans library (or just some set of sources/headers) for staticly detectable defects """
425
429
if type (src_paths ) != ListType :
426
430
src_paths = [src_paths ]
@@ -432,6 +436,7 @@ def static_analysis_scan_library(src_paths, build_path, target, toolchain_name,
432
436
# Toolchain instance
433
437
toolchain = TOOLCHAIN_CLASSES [toolchain_name ](target , options , macros = macros , notify = notify )
434
438
toolchain .VERBOSE = verbose
439
+ toolchain .jobs = jobs
435
440
436
441
# The first path will give the name to the library
437
442
name = basename (src_paths [0 ])
0 commit comments