Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-22 08:41:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-22 08:41:12 +0400
commit7aa14fdbb978393c536503521e8c18708907f9b3 (patch)
tree05e65ac2ce50a6c7c188887626e7d546a8834e0e /build_files/cmake/cmake_static_check_cppcheck.py
parent86d528afa7c54d74162f2ef873da5c62b5c77b52 (diff)
use the systems number of processes for running static checks - multiple jobs.
Diffstat (limited to 'build_files/cmake/cmake_static_check_cppcheck.py')
-rw-r--r--build_files/cmake/cmake_static_check_cppcheck.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/build_files/cmake/cmake_static_check_cppcheck.py b/build_files/cmake/cmake_static_check_cppcheck.py
index 6eb9d4da8b6..fdd380c5b4d 100644
--- a/build_files/cmake/cmake_static_check_cppcheck.py
+++ b/build_files/cmake/cmake_static_check_cppcheck.py
@@ -37,7 +37,7 @@ CHECKER_BIN = "cppcheck"
CHECKER_ARGS = [
# not sure why this is needed, but it is.
- "-I" + os.path.join(project_source_info.SOURCE_DIR, "extern/glew/include"),
+ "-I" + os.path.join(project_source_info.SOURCE_DIR, "extern", "glew", "include"),
# "--check-config", # when includes are missing
# "--enable=all", # if you want sixty hundred pedantic suggestions
@@ -58,19 +58,21 @@ def main():
check_commands.append((c, cmd))
- for i, (c, cmd) in enumerate(check_commands):
+
+ process_functions = []
+ def my_process(i, c, cmd):
percent = 100.0 * (i / (len(check_commands) - 1))
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
- # if percent < 27.9:
- # continue
-
- # let cppcheck finish the line off...
+ sys.stdout.flush()
sys.stdout.write("%s " % percent_str)
- sys.stdout.flush()
- process = subprocess.Popen(cmd)
- process.wait()
+ return subprocess.Popen(cmd)
+
+ for i, (c, cmd) in enumerate(check_commands):
+ process_functions.append((my_process, (i, c, cmd)))
+
+ project_source_info.queue_processes(process_functions)
if __name__ == "__main__":