diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-25 11:35:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-25 11:35:10 +0300 |
commit | da2b4901981e4180f763f45bf8e3bd4262539ad2 (patch) | |
tree | 07fa0a4fdd06a7cbc64dd07413ce63721d528c4a /build_files | |
parent | 57289044ca68859eaf5981db9d72ed438555fd37 (diff) |
cmake maintenance, was missing 2 headers and made some minor improvements to cmake_consistency_check.py.
also converted GHOST_SystemWin32.cpp to utf8.
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/cmake_consistency_check.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py index 7a3ac9eaa79..0998d221b00 100644 --- a/build_files/cmake/cmake_consistency_check.py +++ b/build_files/cmake/cmake_consistency_check.py @@ -128,6 +128,10 @@ def cmake_get_src(f): raise Exception("strict formatting not kept '*)' %s:%d" % (f, i)) break + # replace dirs + l = l.replace("${CMAKE_CURRENT_SOURCE_DIR}", cmake_base) + + if not l: pass elif l.startswith("$"): @@ -202,11 +206,14 @@ for hf in sorted(source_list(base, is_c_header)): import traceback for files in (global_c, global_h): for f in sorted(files): - i = 1 - try: - for l in open(f, "r", encoding="utf8"): - i += 1 - except: - print("Non utf8: %s:%d" % (f, i)) - if i > 1: - traceback.print_exc() + if os.path.exists(f): + # ignore outside of our source tree + if "extern" not in f: + i = 1 + try: + for l in open(f, "r", encoding="utf8"): + i += 1 + except: + print("Non utf8: %s:%d" % (f, i)) + if i > 1: + traceback.print_exc() |