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>2018-01-28 07:18:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-01-28 07:18:33 +0300
commit88174bd22c8798fa5038a3b8d5192e052bfe673e (patch)
tree728c5654cf0fb879027b774d5b4bf964ffe543ec /build_files
parent7aaede920fd1376fc06edd45c73403f2084a64bc (diff)
parent3c852ba0741f794a697f95073b04921e9ff94039 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'build_files')
-rwxr-xr-xbuild_files/cmake/example_scripts/make_quicky.py8
-rwxr-xr-xbuild_files/cmake/project_info.py21
2 files changed, 20 insertions, 9 deletions
diff --git a/build_files/cmake/example_scripts/make_quicky.py b/build_files/cmake/example_scripts/make_quicky.py
index 49c284e354d..a1334d6fc83 100755
--- a/build_files/cmake/example_scripts/make_quicky.py
+++ b/build_files/cmake/example_scripts/make_quicky.py
@@ -107,12 +107,12 @@ def main():
return
# execute
- cmd = "make %s %s blender/fast" % (" ".join(args), " ".join(targets_new))
+ cmd = ["make"] + args + targets_new + ["blender/fast"]
print("cmake building with targets: %s" % " ".join(targets_new))
- print("executing: %s" % cmd)
+ print("executing: %s" % " ".join(cmd))
- import os
- os.system(cmd)
+ import subprocess
+ subprocess.call(cmd)
if __name__ == "__main__":
main()
diff --git a/build_files/cmake/project_info.py b/build_files/cmake/project_info.py
index 9b0905da030..ad205cc228c 100755
--- a/build_files/cmake/project_info.py
+++ b/build_files/cmake/project_info.py
@@ -28,6 +28,9 @@ Module for accessing project file data for Blender.
Before use, call init(cmake_build_dir).
"""
+# TODO: Use CMAKE_EXPORT_COMPILE_COMMANDS (compile_commands.json)
+# Instead of Eclipse project format.
+
__all__ = (
"SIMPLE_PROJECTFILE",
"SOURCE_DIR",
@@ -45,14 +48,22 @@ __all__ = (
import sys
-if not sys.version.startswith("3"):
+if sys.version_info.major < 3:
print("\nPython3.x needed, found %s.\nAborting!\n" %
sys.version.partition(" ")[0])
sys.exit(1)
+import subprocess
import os
-from os.path import join, dirname, normpath, abspath, splitext, exists
+from os.path import (
+ abspath,
+ dirname,
+ exists,
+ join,
+ normpath,
+ splitext,
+)
SOURCE_DIR = join(dirname(__file__), "..", "..")
SOURCE_DIR = normpath(SOURCE_DIR)
@@ -146,13 +157,13 @@ def cmake_advanced_info():
raise Exception("Error: win32 is not supported")
else:
if make_exe_basename.startswith(("make", "gmake")):
- cmd = 'cmake "%s" -G"Eclipse CDT4 - Unix Makefiles"' % CMAKE_DIR
+ cmd = ("cmake", CMAKE_DIR, "-GEclipse CDT4 - Unix Makefiles")
elif make_exe_basename.startswith("ninja"):
- cmd = 'cmake "%s" -G"Eclipse CDT4 - Ninja"' % CMAKE_DIR
+ cmd = ("cmake", CMAKE_DIR, "-GEclipse CDT4 - Ninja")
else:
raise Exception("Unknown make program %r" % make_exe)
- os.system(cmd)
+ subprocess.check_call(cmd)
return join(CMAKE_DIR, ".cproject")
includes = []