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:
Diffstat (limited to 'build_files/cmake/cmake_static_check_cppcheck.py')
-rw-r--r--build_files/cmake/cmake_static_check_cppcheck.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/build_files/cmake/cmake_static_check_cppcheck.py b/build_files/cmake/cmake_static_check_cppcheck.py
index c340ca5c458..518b94d74a5 100644
--- a/build_files/cmake/cmake_static_check_cppcheck.py
+++ b/build_files/cmake/cmake_static_check_cppcheck.py
@@ -27,9 +27,12 @@ import subprocess
import sys
import os
+USE_QUIET = (os.environ.get("QUIET", None) is not None)
+
CHECKER_IGNORE_PREFIX = [
"extern",
"intern/moto",
+ "blender/intern/opennl",
]
CHECKER_BIN = "cppcheck"
@@ -54,18 +57,19 @@ def main():
[c] +
[("-I%s" % i) for i in inc_dirs] +
[("-D%s" % d) for d in defs]
- )
+ )
check_commands.append((c, cmd))
process_functions = []
def my_process(i, c, cmd):
- percent = 100.0 * (i / (len(check_commands) - 1))
- percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
+ if not USE_QUIET:
+ percent = 100.0 * (i / (len(check_commands) - 1))
+ percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
- sys.stdout.flush()
- sys.stdout.write("%s " % percent_str)
+ sys.stdout.flush()
+ sys.stdout.write("%s " % percent_str)
return subprocess.Popen(cmd)