diff options
Diffstat (limited to 'build_files/cmake/cmake_static_check_cppcheck.py')
-rw-r--r-- | build_files/cmake/cmake_static_check_cppcheck.py | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/build_files/cmake/cmake_static_check_cppcheck.py b/build_files/cmake/cmake_static_check_cppcheck.py index f6d46904794..1c8d619a513 100644 --- a/build_files/cmake/cmake_static_check_cppcheck.py +++ b/build_files/cmake/cmake_static_check_cppcheck.py @@ -37,12 +37,13 @@ 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 ] + def main(): source_info = project_source_info.build_info(ignore_prefix_list=CHECKER_IGNORE_PREFIX) @@ -57,19 +58,21 @@ def main(): check_commands.append((c, cmd)) - for i, (c, cmd) in enumerate(check_commands): - percent = 100.0 * (i / (len(check_commands)-1)) + 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.write("%s " % percent_str) sys.stdout.flush() - process = subprocess.Popen(cmd) - process.wait() + sys.stdout.write("%s " % percent_str) + + 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__": |