diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-20 22:29:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-20 22:29:19 +0400 |
commit | 8f5112f191e24aac86da7b70f461a50825e764da (patch) | |
tree | d5173d6b71e8d889a9766699ee0aa6eb89d7dbfb /build_files/cmake | |
parent | 0af633a36ce34fc2d80fb571f4b0e73233563827 (diff) |
pep8 update & some minor cmake edits.
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/cmake_static_check_cppcheck.py | 7 | ||||
-rw-r--r-- | build_files/cmake/cmake_static_check_splint.py | 4 | ||||
-rw-r--r-- | build_files/cmake/project_source_info.py | 7 |
3 files changed, 7 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..6eb9d4da8b6 100644 --- a/build_files/cmake/cmake_static_check_cppcheck.py +++ b/build_files/cmake/cmake_static_check_cppcheck.py @@ -43,6 +43,7 @@ CHECKER_ARGS = [ # "--enable=all", # if you want sixty hundred pedantic suggestions ] + def main(): source_info = project_source_info.build_info(ignore_prefix_list=CHECKER_IGNORE_PREFIX) @@ -58,12 +59,12 @@ def main(): check_commands.append((c, cmd)) for i, (c, cmd) in enumerate(check_commands): - percent = 100.0 * (i / (len(check_commands)-1)) + 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) diff --git a/build_files/cmake/cmake_static_check_splint.py b/build_files/cmake/cmake_static_check_splint.py index 3614ab48cf8..aa13ef82e3c 100644 --- a/build_files/cmake/cmake_static_check_splint.py +++ b/build_files/cmake/cmake_static_check_splint.py @@ -58,9 +58,9 @@ CHECKER_ARGS = [ # re-definitions, rna causes most of these "-redef", "-syntax", - + # dummy, witjout this splint complains with: - # /usr/include/bits/confname.h:31:27: *** Internal Bug at cscannerHelp.c:2428: Unexpanded macro not function or constant: int _PC_MAX_CANON + # /usr/include/bits/confname.h:31:27: *** Internal Bug at cscannerHelp.c:2428: Unexpanded macro not function or constant: int _PC_MAX_CANON "-D_PC_MAX_CANON=0", ] diff --git a/build_files/cmake/project_source_info.py b/build_files/cmake/project_source_info.py index c4b83d20ea5..670befbf2aa 100644 --- a/build_files/cmake/project_source_info.py +++ b/build_files/cmake/project_source_info.py @@ -27,7 +27,6 @@ __all__ = ( ) import os -import sys from os.path import join, dirname, normpath, abspath SOURCE_DIR = join(dirname(__file__), "..", "..") @@ -40,11 +39,6 @@ def is_c_header(filename): return (ext in (".h", ".hpp", ".hxx")) -def is_c_header(filename): - ext = os.path.splitext(filename)[1] - return (ext in (".h", ".hpp", ".hxx")) - - def is_c(filename): ext = os.path.splitext(filename)[1] return (ext in (".c", ".cpp", ".cxx", ".m", ".mm", ".rc")) @@ -79,6 +73,7 @@ def do_ignore(filepath, ignore_prefix_list): def makefile_log(): import subprocess + import time # Check blender is not 2.5x until it supports playback again print("running make with --dry-run ...") process = subprocess.Popen(["make", "--always-make", "--dry-run", "--keep-going", "VERBOSE=1"], |