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>2016-04-12 13:08:25 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-04-12 13:12:29 +0300
commitf636b8bfc09cf740d481dbd8c8d2aa1c75f5ea04 (patch)
tree5cd549ed6ed54d2d1e26f86dc00db548e3ddfead /build_files/cmake/cmake_consistency_check.py
parentd4979f1d6643ce26807af69dc9939f26de01b974 (diff)
CMake: consistency check now reports stale ignores
Also update ignore list.
Diffstat (limited to 'build_files/cmake/cmake_consistency_check.py')
-rwxr-xr-xbuild_files/cmake/cmake_consistency_check.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py
index 7ad47267239..6cd66b7640c 100755
--- a/build_files/cmake/cmake_consistency_check.py
+++ b/build_files/cmake/cmake_consistency_check.py
@@ -240,9 +240,10 @@ def cmake_get_src(f):
filen.close()
-def is_ignore(f):
- for ig in IGNORE:
+def is_ignore(f, ignore_used):
+ for index, ig in enumerate(IGNORE):
if ig in f:
+ ignore_used[index] = True
return True
return False
@@ -283,10 +284,12 @@ def main():
del is_err
del errs
+ ignore_used = [False] * len(IGNORE)
+
# now check on files not accounted for.
print("\nC/C++ Files CMake doesnt know about...")
for cf in sorted(source_list(SOURCE_DIR, is_c)):
- if not is_ignore(cf):
+ if not is_ignore(cf, ignore_used):
if cf not in global_c:
print("missing_c: ", cf)
@@ -303,7 +306,7 @@ def main():
print("\nC/C++ Headers CMake doesnt know about...")
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
- if not is_ignore(hf):
+ if not is_ignore(hf, ignore_used):
if hf not in global_h:
print("missing_h: ", hf)
@@ -324,5 +327,12 @@ def main():
if i > 1:
traceback.print_exc()
+ # Check ignores aren't stale
+ print("\nCheck for unused 'IGNORE' paths...")
+ for index, ig in enumerate(IGNORE):
+ if not ignore_used[index]:
+ print("unused ignore: %r" % ig)
+
+
if __name__ == "__main__":
main()