forked from bartvdbraak/blender
minor updates to the cmake checker
This commit is contained in:
parent
ef1824cdcb
commit
fedc811014
@ -23,15 +23,16 @@
|
|||||||
|
|
||||||
# <pep8 compliant>
|
# <pep8 compliant>
|
||||||
|
|
||||||
IGNORE = \
|
IGNORE = (
|
||||||
"/test/",\
|
"/test/",
|
||||||
"/decimate_glut_test/",\
|
"/decimate_glut_test/",
|
||||||
"/BSP_GhostTest/",\
|
"/BSP_GhostTest/",
|
||||||
"/release/",\
|
"/release/",
|
||||||
"/xembed/",\
|
"/xembed/",
|
||||||
"/decimation/intern/future/",\
|
"/decimation/intern/future/",
|
||||||
"/TerraplayNetwork/",\
|
"/TerraplayNetwork/",
|
||||||
"/ik_glut_test/"
|
"/ik_glut_test/",
|
||||||
|
)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from os.path import join, dirname, normpath, abspath, splitext
|
from os.path import join, dirname, normpath, abspath, splitext
|
||||||
@ -104,7 +105,7 @@ def cmake_get_src(f):
|
|||||||
found = True
|
found = True
|
||||||
break
|
break
|
||||||
|
|
||||||
if "list(APPEND SRC" in l:
|
if "list(APPEND SRC" in l or ('list(APPEND ' in l and l.endswith("SRC")):
|
||||||
if l.endswith(")"):
|
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
|
found = True
|
||||||
@ -136,7 +137,9 @@ def cmake_get_src(f):
|
|||||||
if not l:
|
if not l:
|
||||||
pass
|
pass
|
||||||
elif l.startswith("$"):
|
elif l.startswith("$"):
|
||||||
print("Cant use var '%s' %s:%d" % (l, f, i))
|
# assume if it ends with SRC we know about it
|
||||||
|
if not l.split("}")[0].endswith("SRC"):
|
||||||
|
print("Can't use var '%s' %s:%d" % (l, f, i))
|
||||||
elif len(l.split()) > 1:
|
elif len(l.split()) > 1:
|
||||||
raise Exception("Multi-line define '%s' %s:%d" % (l, f, i))
|
raise Exception("Multi-line define '%s' %s:%d" % (l, f, i))
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user