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>2010-12-14 11:35:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-14 11:35:56 +0300
commit996bc87793ebb6ad2b347c8e5fce1f2987607c58 (patch)
treeb61382f784d540b78d8dbd0db7c5d4a79325a8a5 /build_files
parentc52ba88f7912124b3efeeb7709cc24497d3cc2ec (diff)
update for changes in cmake files.
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/cmake_consistency_check.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py
index 8ff6ae241f8..302ea8561d1 100644
--- a/build_files/cmake/cmake_consistency_check.py
+++ b/build_files/cmake/cmake_consistency_check.py
@@ -30,10 +30,13 @@ IGNORE = \
"/ik_glut_test/"
import os
-from os.path import join, dirname, normpath
+from os.path import join, dirname, normpath, abspath
-base = join(os.getcwd(), "..", "..")
+base = join(os.path.dirname(__file__), "..", "..")
base = normpath(base)
+base = abspath(base)
+
+print("Scanning:", base)
global_h = set()
global_c = set()
@@ -76,7 +79,7 @@ def cmake_get_src(f):
sources_h = []
sources_c = []
- filen = open(f, "r")
+ filen = open(f, "r", encoding="utf8")
it = iter(filen)
found = False
i = 0
@@ -91,15 +94,15 @@ def cmake_get_src(f):
break
l = l.strip()
if not l.startswith("#"):
- if 'SET(SRC' in l or ('SET(' in l and l.endswith("SRC")):
+ if 'set(SRC' in l or ('set(' in l and l.endswith("SRC")):
if len(l.split()) > 1:
- raise Exception("strict formatting not kept 'SET(SRC*' %s:%d" % (f, i))
+ raise Exception("strict formatting not kept 'set(SRC*' %s:%d" % (f, i))
found = True
break
- if "LIST(APPEND SRC" in l:
+ if "list(APPEND SRC" in l:
if l.endswith(")"):
- raise Exception("strict formatting not kept 'LIST(APPEND SRC...)' on 1 line %s:%d" % (f, i))
+ raise Exception("strict formatting not kept 'list(APPEND SRC...)' on 1 line %s:%d" % (f, i))
found = True
break