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>2015-05-17 09:05:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-17 09:05:38 +0300
commit60f60ed49641fbe1950460b89fcd2b5c494f1437 (patch)
tree6e710f89865222e7de4dc0e105caa21b876bc1e9 /build_files/cmake/cmake_consistency_check.py
parent6c15f3044be138d025b2ae5d6be56103a65b4fa0 (diff)
CMake: fixes for own checking script
don't error if generated files are missing.
Diffstat (limited to 'build_files/cmake/cmake_consistency_check.py')
-rwxr-xr-xbuild_files/cmake/cmake_consistency_check.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py
index 0883bdbf2d7..1a366880315 100755
--- a/build_files/cmake/cmake_consistency_check.py
+++ b/build_files/cmake/cmake_consistency_check.py
@@ -28,7 +28,13 @@ if not sys.version.startswith("3"):
sys.version.partition(" ")[0])
sys.exit(1)
-from cmake_consistency_check_config import IGNORE, UTF8_CHECK, SOURCE_DIR
+from cmake_consistency_check_config import (
+ IGNORE,
+ UTF8_CHECK,
+ SOURCE_DIR,
+ BUILD_DIR,
+ )
+
import os
from os.path import join, dirname, normpath, splitext
@@ -134,6 +140,7 @@ def cmake_get_src(f):
if found:
cmake_base = dirname(f)
+ cmake_base_bin = os.path.join(BUILD_DIR, os.path.relpath(cmake_base, SOURCE_DIR))
while it is not None:
i += 1
@@ -154,6 +161,8 @@ def cmake_get_src(f):
# replace dirs
l = l.replace("${CMAKE_CURRENT_SOURCE_DIR}", cmake_base)
+ l = l.replace("${CMAKE_CURRENT_BINARY_DIR}", cmake_base_bin)
+ l = l.strip('"')
if not l:
pass
@@ -193,7 +202,10 @@ def cmake_get_src(f):
raise Exception("unknown file type - not c or h %s -> %s" % (f, new_file))
elif context_name == "INC":
- if os.path.isdir(new_file):
+ if new_file.startswith(BUILD_DIR):
+ # assume generated path
+ pass
+ elif os.path.isdir(new_file):
new_path_rel = os.path.relpath(new_file, cmake_base)
if new_path_rel != l:
@@ -246,7 +258,7 @@ print("\nChecking for missing references:")
is_err = False
errs = []
for f in (global_h | global_c):
- if f.endswith("dna.c"):
+ if f.startswith(BUILD_DIR):
continue
if not os.path.exists(f):