Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BlenderPhi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
raas
BlenderPhi
Commits
41d17291
Commit
41d17291
authored
4 years ago
by
Campbell Barton
Browse files
Options
Downloads
Plain Diff
Merge branch 'blender-v2.92-release'
parents
6f47549f
be970c03
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build_files/cmake/cmake_consistency_check.py
+23
-16
23 additions, 16 deletions
build_files/cmake/cmake_consistency_check.py
with
23 additions
and
16 deletions
build_files/cmake/cmake_consistency_check.py
+
23
−
16
View file @
41d17291
...
...
@@ -20,6 +20,8 @@
# <pep8 compliant>
# Note: this code should be cleaned up / refactored.
import
sys
if
sys
.
version_info
.
major
<
3
:
print
(
"
\n
Python3.x needed, found %s.
\n
Aborting!
\n
"
%
...
...
@@ -37,7 +39,12 @@ from cmake_consistency_check_config import (
import
os
from
os.path
import
join
,
dirname
,
normpath
,
splitext
from
os.path
import
(
dirname
,
join
,
normpath
,
splitext
,
)
global_h
=
set
()
global_c
=
set
()
...
...
@@ -45,8 +52,8 @@ global_refs = {}
# Flatten `IGNORE_SOURCE_MISSING` to avoid nested looping.
IGNORE_SOURCE_MISSING
=
[
(
k
,
ig
)
for
k
,
ig_list
in
IGNORE_SOURCE_MISSING
for
ig
in
ig_list
(
k
,
ig
nore_path
)
for
k
,
ig_list
in
IGNORE_SOURCE_MISSING
for
ig
nore_path
in
ig_list
]
# Ignore cmake file, path pairs.
...
...
@@ -263,16 +270,16 @@ def cmake_get_src(f):
def
is_ignore_source
(
f
,
ignore_used
):
for
index
,
ig
in
enumerate
(
IGNORE_SOURCE
):
if
ig
in
f
:
for
index
,
ig
nore_path
in
enumerate
(
IGNORE_SOURCE
):
if
ig
nore_path
in
f
:
ignore_used
[
index
]
=
True
return
True
return
False
def
is_ignore_cmake
(
f
,
ignore_used
):
for
index
,
ig
in
enumerate
(
IGNORE_CMAKE
):
if
ig
in
f
:
for
index
,
ig
nore_path
in
enumerate
(
IGNORE_CMAKE
):
if
ig
nore_path
in
f
:
ignore_used
[
index
]
=
True
return
True
return
False
...
...
@@ -303,7 +310,7 @@ def main():
for
cf
,
i
in
refs
:
errs
.
append
((
cf
,
i
))
else
:
raise
Exception
(
"
CMake referen
e
cs missing, internal error, aborting!
"
)
raise
Exception
(
"
CMake referenc
e
s missing, internal error, aborting!
"
)
is_err
=
True
errs
.
sort
()
...
...
@@ -314,7 +321,7 @@ def main():
# print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
if
is_err
:
raise
Exception
(
"
CMake referen
e
cs missing files, aborting!
"
)
raise
Exception
(
"
CMake referenc
e
s missing files, aborting!
"
)
del
is_err
del
errs
...
...
@@ -325,7 +332,7 @@ def main():
if
cf
not
in
global_c
:
print
(
"
missing_c:
"
,
cf
)
#
c
heck if automake builds a corr
a
sponding .o file.
#
C
heck if automake builds a corr
e
sponding .o file.
'''
if cf in global_c:
out1 = os.path.splitext(cf)[0] +
"
.o
"
...
...
@@ -361,21 +368,21 @@ def main():
# Check ignores aren't stale
print
(
"
\n
Check for unused
'
IGNORE_SOURCE
'
paths...
"
)
for
index
,
ig
in
enumerate
(
IGNORE_SOURCE
):
for
index
,
ig
nore_path
in
enumerate
(
IGNORE_SOURCE
):
if
not
ignore_used_source
[
index
]:
print
(
"
unused ignore: %r
"
%
ig
)
print
(
"
unused ignore: %r
"
%
ig
nore_path
)
# Check ignores aren't stale
print
(
"
\n
Check for unused
'
IGNORE_SOURCE_MISSING
'
paths...
"
)
for
k
,
v
in
sorted
(
global_ignore_source_missing
.
items
()):
for
ig
in
v
:
print
(
"
unused ignore: %r -> %r
"
%
(
ig
,
k
))
for
ig
nore_path
in
v
:
print
(
"
unused ignore: %r -> %r
"
%
(
ig
nore_path
,
k
))
# Check ignores aren't stale
print
(
"
\n
Check for unused
'
IGNORE_CMAKE
'
paths...
"
)
for
index
,
ig
in
enumerate
(
IGNORE_CMAKE
):
for
index
,
ig
nore_path
in
enumerate
(
IGNORE_CMAKE
):
if
not
ignore_used_cmake
[
index
]:
print
(
"
unused ignore: %r
"
%
ig
)
print
(
"
unused ignore: %r
"
%
ig
nore_path
)
if
__name__
==
"
__main__
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment