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:
authorJason Wilkins <Jason.A.Wilkins@gmail.com>2014-06-27 12:01:42 +0400
committerJason Wilkins <Jason.A.Wilkins@gmail.com>2014-06-27 12:01:42 +0400
commit4606950e81efe0c594f0e9908a6ab09691667255 (patch)
tree367031e502d56eb50b989f1e3ab0a2d4f388fb62 /build_files
parent8ecdbe5f9861b992e1d467833a435c3fb6080348 (diff)
parent0a0e4e0e698eb496c4fb18c79b532104581ce0af (diff)
Merge branch 'master' of git.blender.org:blender into soc-2014-viewport_fx
Conflicts: CMakeLists.txt source/creator/CMakeLists.txt source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLLight.cpp
Diffstat (limited to 'build_files')
-rw-r--r--build_files/buildbot/config/user-config-mac-i386.py2
-rw-r--r--build_files/buildbot/config/user-config-mac-x86_64.py2
-rw-r--r--build_files/cmake/Modules/GTestTesting.cmake47
-rw-r--r--build_files/cmake/buildinfo.cmake4
-rw-r--r--build_files/cmake/macros.cmake239
-rw-r--r--build_files/scons/config/win32-vc-config.py2
-rw-r--r--build_files/scons/config/win64-vc-config.py2
-rw-r--r--build_files/scons/tools/Blender.py39
-rw-r--r--build_files/scons/tools/btools.py21
9 files changed, 337 insertions, 21 deletions
diff --git a/build_files/buildbot/config/user-config-mac-i386.py b/build_files/buildbot/config/user-config-mac-i386.py
index 296b752649d..07627b91331 100644
--- a/build_files/buildbot/config/user-config-mac-i386.py
+++ b/build_files/buildbot/config/user-config-mac-i386.py
@@ -1,5 +1,5 @@
MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
-WITH_BF_CYCLES_CUDA_BINARIES = True
+WITH_BF_CYCLES_CUDA_BINARIES = False
diff --git a/build_files/buildbot/config/user-config-mac-x86_64.py b/build_files/buildbot/config/user-config-mac-x86_64.py
index ac923f48abe..ba42136d7c3 100644
--- a/build_files/buildbot/config/user-config-mac-x86_64.py
+++ b/build_files/buildbot/config/user-config-mac-x86_64.py
@@ -1,5 +1,5 @@
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
-WITH_BF_CYCLES_CUDA_BINARIES = True
+WITH_BF_CYCLES_CUDA_BINARIES = False
diff --git a/build_files/cmake/Modules/GTestTesting.cmake b/build_files/cmake/Modules/GTestTesting.cmake
new file mode 100644
index 00000000000..fd0379b8f78
--- /dev/null
+++ b/build_files/cmake/Modules/GTestTesting.cmake
@@ -0,0 +1,47 @@
+#=============================================================================
+# Copyright 2014 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#
+# Inspired on the Testing.cmake from Libmv
+#
+#=============================================================================
+
+macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
+ if(WITH_GTESTS)
+ get_property(_current_include_directories
+ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ PROPERTY INCLUDE_DIRECTORIES)
+ set(TEST_INC
+ ${_current_include_directories}
+ ${CMAKE_SOURCE_DIR}/tests/gtests
+ ${CMAKE_SOURCE_DIR}/extern/libmv/third_party/glog/src
+ ${CMAKE_SOURCE_DIR}/extern/libmv/third_party/gflags
+ ${CMAKE_SOURCE_DIR}/extern/gtest/include
+ )
+ unset(_current_include_directories)
+
+ add_executable(${NAME}_test ${SRC})
+ target_link_libraries(${NAME}_test
+ ${EXTRA_LIBS}
+ bf_testing_main
+ bf_intern_guardedalloc
+ extern_gtest
+ extern_glog)
+ set_target_properties(${NAME}_test PROPERTIES
+ RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
+ RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}"
+ RUNTIME_OUTPUT_DIRECTORY_DEBUG "${TESTS_OUTPUT_DIR}"
+ INCLUDE_DIRECTORIES "${TEST_INC}")
+ add_test(${NAME}_test ${TESTS_OUTPUT_DIR}/${NAME}_test)
+ endif()
+endmacro()
+
+macro(BLENDER_TEST NAME EXTRA_LIBS)
+ BLENDER_SRC_GTEST("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}")
+endmacro()
diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake
index 245d7472158..ead2474fd8a 100644
--- a/build_files/cmake/buildinfo.cmake
+++ b/build_files/cmake/buildinfo.cmake
@@ -86,6 +86,10 @@ if(EXISTS ${SOURCE_DIR}/.git)
endif()
endif()
+ if(MY_WC_BRANCH MATCHES "^blender-v")
+ set(MY_WC_BRANCH "master")
+ endif()
+
unset(_git_below_check)
endif()
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 80a4858bf94..9c3f46322c1 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -415,6 +415,243 @@ macro(setup_liblinks
target_link_libraries(${target} ${PLATFORM_LINKLIBS} ${CMAKE_DL_LIBS})
endmacro()
+macro(SETUP_BLENDER_SORTED_LIBS)
+ get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
+
+ list(APPEND BLENDER_LINK_LIBS
+ bf_windowmanager
+ bf_render
+ )
+
+ if(WITH_MOD_FLUID)
+ list(APPEND BLENDER_LINK_LIBS bf_intern_elbeem)
+ endif()
+
+ if(WITH_CYCLES)
+ list(APPEND BLENDER_LINK_LIBS
+ cycles_render
+ cycles_bvh
+ cycles_device
+ cycles_kernel
+ cycles_util
+ cycles_subd)
+ if(WITH_CYCLES_OSL)
+ list(APPEND BLENDER_LINK_LIBS cycles_kernel_osl)
+ endif()
+ endif()
+
+ # Sort libraries
+ set(BLENDER_SORTED_LIBS
+ bf_windowmanager
+
+ bf_editor_space_api
+ bf_editor_space_action
+ bf_editor_space_buttons
+ bf_editor_space_console
+ bf_editor_space_file
+ bf_editor_space_graph
+ bf_editor_space_image
+ bf_editor_space_info
+ bf_editor_space_logic
+ bf_editor_space_nla
+ bf_editor_space_node
+ bf_editor_space_outliner
+ bf_editor_space_script
+ bf_editor_space_sequencer
+ bf_editor_space_text
+ bf_editor_space_time
+ bf_editor_space_userpref
+ bf_editor_space_view3d
+ bf_editor_space_clip
+
+ bf_editor_transform
+ bf_editor_util
+ bf_editor_uvedit
+ bf_editor_curve
+ bf_editor_gpencil
+ bf_editor_interface
+ bf_editor_mesh
+ bf_editor_metaball
+ bf_editor_object
+ bf_editor_armature
+ bf_editor_physics
+ bf_editor_render
+ bf_editor_screen
+ bf_editor_sculpt_paint
+ bf_editor_sound
+ bf_editor_animation
+ bf_editor_datafiles
+ bf_editor_mask
+ bf_editor_io
+
+ bf_render
+ bf_python
+ bf_python_ext
+ bf_python_mathutils
+ bf_python_bmesh
+ bf_freestyle
+ bf_ikplugin
+ bf_modifiers
+ bf_bmesh
+ bf_blenkernel
+ bf_nodes
+ bf_gpu
+ bf_blenloader
+ bf_imbuf
+ bf_blenlib
+ bf_intern_ghost
+ bf_intern_string
+ bf_avi
+ bf_imbuf_cineon
+ bf_imbuf_openexr
+ bf_imbuf_openimageio
+ bf_imbuf_dds
+ bf_collada
+ bf_intern_elbeem
+ bf_intern_memutil
+ bf_intern_guardedalloc
+ bf_intern_ctr
+ bf_intern_utfconv
+ ge_blen_routines
+ ge_converter
+ ge_phys_dummy
+ ge_phys_bullet
+ bf_intern_smoke
+ extern_minilzo
+ extern_lzma
+ extern_colamd
+ ge_logic_ketsji
+ extern_recastnavigation
+ ge_logic
+ ge_rasterizer
+ ge_oglrasterizer
+ ge_logic_expressions
+ ge_scenegraph
+ ge_logic_network
+ ge_logic_ngnetwork
+ ge_logic_loopbacknetwork
+ bf_intern_moto
+ extern_openjpeg
+ extern_redcode
+ ge_videotex
+ bf_rna
+ bf_dna
+ bf_blenfont
+ bf_intern_audaspace
+ bf_intern_mikktspace
+ bf_intern_dualcon
+ bf_intern_cycles
+ cycles_render
+ cycles_bvh
+ cycles_device
+ cycles_kernel
+ cycles_util
+ cycles_subd
+ bf_intern_raskter
+ bf_intern_opencolorio
+ extern_rangetree
+ extern_wcwidth
+ extern_libmv
+ extern_glog
+ )
+
+ if(WITH_COMPOSITOR)
+ # added for opencl compositor
+ list_insert_before(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_compositor")
+ list_insert_after(BLENDER_SORTED_LIBS "bf_compositor" "bf_intern_opencl")
+ endif()
+
+ if(WITH_LIBMV)
+ list(APPEND BLENDER_SORTED_LIBS extern_ceres)
+ endif()
+
+ if(WITH_MOD_CLOTH_ELTOPO)
+ list(APPEND BLENDER_SORTED_LIBS extern_eltopo)
+ endif()
+
+ if(NOT WITH_SYSTEM_GLEW)
+ list(APPEND BLENDER_SORTED_LIBS ${BLENDER_GLEW_LIBRARIES})
+ endif()
+
+ if(WITH_BINRELOC)
+ list(APPEND BLENDER_SORTED_LIBS extern_binreloc)
+ endif()
+
+ if(WITH_CXX_GUARDEDALLOC)
+ list(APPEND BLENDER_SORTED_LIBS bf_intern_guardedalloc_cpp)
+ endif()
+
+ if(WITH_IK_SOLVER)
+ list_insert_after(BLENDER_SORTED_LIBS "bf_intern_elbeem" "bf_intern_iksolver")
+ endif()
+
+ if(WITH_IK_ITASC)
+ list(APPEND BLENDER_SORTED_LIBS bf_intern_itasc)
+ endif()
+
+ if(WITH_CODEC_QUICKTIME)
+ list(APPEND BLENDER_SORTED_LIBS bf_quicktime)
+ endif()
+
+ if(WITH_INPUT_NDOF)
+ list(APPEND BLENDER_SORTED_LIBS bf_intern_ghostndof3dconnexion)
+ endif()
+
+ if(WITH_MOD_BOOLEAN)
+ list(APPEND BLENDER_SORTED_LIBS extern_carve)
+ endif()
+
+ if(WITH_GHOST_XDND)
+ list(APPEND BLENDER_SORTED_LIBS extern_xdnd)
+ endif()
+
+ if(WITH_CYCLES_OSL)
+ list_insert_after(BLENDER_SORTED_LIBS "cycles_kernel" "cycles_kernel_osl")
+ endif()
+
+ if(WITH_INTERNATIONAL)
+ list(APPEND BLENDER_SORTED_LIBS bf_intern_locale)
+ endif()
+
+ if(WITH_OPENNL)
+ list_insert_after(BLENDER_SORTED_LIBS "bf_render" "bf_intern_opennl")
+ endif()
+
+ if(WITH_BULLET)
+ list_insert_after(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_intern_rigidbody")
+ endif()
+
+ if(WITH_BULLET AND NOT WITH_SYSTEM_BULLET)
+ list_insert_after(BLENDER_SORTED_LIBS "ge_logic_ngnetwork" "extern_bullet")
+ endif()
+
+ foreach(SORTLIB ${BLENDER_SORTED_LIBS})
+ set(REMLIB ${SORTLIB})
+ foreach(SEARCHLIB ${BLENDER_LINK_LIBS})
+ if(${SEARCHLIB} STREQUAL ${SORTLIB})
+ set(REMLIB "")
+ endif()
+ endforeach()
+ if(REMLIB)
+ # message(STATUS "Removing library ${REMLIB} from blender linking because: not configured")
+ list(APPEND REM_MSG ${REMLIB})
+ list(REMOVE_ITEM BLENDER_SORTED_LIBS ${REMLIB})
+ endif()
+ endforeach()
+ if(REM_MSG)
+ list(SORT REM_MSG)
+ message(STATUS "Blender Skipping: (${REM_MSG})")
+ endif()
+
+ unset(SEARCHLIB)
+ unset(SORTLIB)
+ unset(REMLIB)
+ unset(REM_MSG)
+
+ # for top-level tests
+ set_property(GLOBAL PROPERTY BLENDER_SORTED_LIBS_PROP ${BLENDER_SORTED_LIBS})
+endmacro()
+
macro(TEST_SSE_SUPPORT
_sse_flags
_sse2_flags)
@@ -1008,7 +1245,7 @@ macro(msgfmt_simple
OUTPUT ${_file_to}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/msgfmt ${_file_from} ${_file_to}
- DEPENDS msgfmt)
+ DEPENDS msgfmt ${_file_from})
set_source_files_properties(${_file_to} PROPERTIES GENERATED TRUE)
diff --git a/build_files/scons/config/win32-vc-config.py b/build_files/scons/config/win32-vc-config.py
index 524446d4b2e..ebe24bf0644 100644
--- a/build_files/scons/config/win32-vc-config.py
+++ b/build_files/scons/config/win32-vc-config.py
@@ -31,7 +31,7 @@ BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
-WITH_BF_PYTHON_INSTALL_NUMPY = False
+WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py
index a45c0b1d3b6..d94de3b54e4 100644
--- a/build_files/scons/config/win64-vc-config.py
+++ b/build_files/scons/config/win64-vc-config.py
@@ -32,7 +32,7 @@ BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
-WITH_BF_PYTHON_INSTALL_NUMPY = False
+WITH_BF_PYTHON_INSTALL_NUMPY = True
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 621a85a2d91..e0f18480c74 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -406,57 +406,66 @@ def buildinfo(lenv, build_type):
"""
Generate a buildinfo object
"""
+ import subprocess
+
build_date = time.strftime ("%Y-%m-%d")
build_time = time.strftime ("%H:%M:%S")
if os.path.isdir(os.path.abspath('.git')):
- build_commit_timestamp = os.popen('git log -1 --format=%ct').read().strip()
+ try:
+ build_commit_timestamp = btools.get_command_output(args=['git', 'log', '-1', '--format=%ct']).strip()
+ except OSError:
+ build_commit_timestamp = None
if not build_commit_timestamp:
# Git command not found
build_hash = 'unknown'
build_commit_timestamp = '0'
build_branch = 'unknown'
else:
- import subprocess
no_upstream = False
- process = subprocess.Popen(['git', 'rev-parse', '--short', '@{u}'],
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- build_hash, stderr = process.communicate()
- build_hash = build_hash.strip()
- build_branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
+ try :
+ build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}']).strip()
+ except subprocess.CalledProcessError:
+ # assume branch has no upstream configured
+ build_hash = ''
+
+ build_branch = btools.get_command_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).strip()
if build_branch == 'HEAD':
- master_check = os.popen('git branch --list master --contains ' + build_hash).read().strip()
+ master_check = btools.get_command_output(['git', 'branch', '--list', 'master', '--contains', build_hash]).strip()
if master_check == 'master':
build_branch = 'master'
else:
- head_hash = os.popen('git rev-parse HEAD').read().strip()
- tag_hashes = os.popen('git show-ref --tags -d').read()
+ head_hash = btools.get_command_output(['git', 'rev-parse', 'HEAD']).strip()
+ tag_hashes = btools.get_command_output(['git', 'show-ref', '--tags', '-d'])
if tag_hashes.find(head_hash) != -1:
build_branch = 'master'
if build_hash == '':
- build_hash = os.popen('git rev-parse --short HEAD').read().strip()
+ build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
no_upstream = True
else:
- older_commits = os.popen('git log --oneline HEAD..@{u}').read().strip()
+ older_commits = btools.get_command_output(['git', 'log', '--oneline', 'HEAD..@{u}']).strip()
if older_commits:
- build_hash = os.popen('git rev-parse --short HEAD').read().strip()
+ build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
# ## Check for local modifications
has_local_changes = False
# Update GIT index before getting dirty files
os.system('git update-index -q --refresh')
- changed_files = os.popen('git diff-index --name-only HEAD --').read().strip()
+ changed_files = btools.get_command_output(['git', 'diff-index', '--name-only', 'HEAD', '--']).strip()
if changed_files:
has_local_changes = True
elif no_upstream == False:
- unpushed_log = os.popen('git log --oneline @{u}..').read().strip()
+ unpushed_log = btools.get_command_output(['git', 'log', '--oneline', '@{u}..']).strip()
has_local_changes = unpushed_log != ''
+ if build_branch.startswith('blender-v'):
+ build_branch = 'master'
+
if has_local_changes:
build_branch += ' (modified)'
else:
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index 6eff3dd682b..4124d066734 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -14,6 +14,21 @@ import sys
Variables = SCons.Variables
BoolVariable = SCons.Variables.BoolVariable
+def get_command_output(*popenargs, **kwargs):
+ if hasattr(subprocess, "check_output"):
+ return subprocess.check_output(*popenargs, **kwargs)
+ if 'stdout' in kwargs:
+ raise ValueError('stdout argument not allowed, it will be overridden.')
+ process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
+ output, unused_err = process.communicate()
+ retcode = process.poll()
+ if retcode:
+ cmd = kwargs.get("args")
+ if cmd is None:
+ cmd = popenargs[0]
+ raise subprocess.CalledProcessError(retcode, cmd)
+ return output
+
def get_version():
import re
@@ -56,7 +71,11 @@ def get_version():
raise Exception("%s: missing version string" % fname)
def get_hash():
- build_hash = os.popen('git rev-parse --short HEAD').read().strip()
+ try:
+ build_hash = get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
+ except OSError:
+ build_hash = None
+ print("WARNING: could not use git to retrieve current Blender repository hash...")
if build_hash == '' or build_hash == None:
build_hash = 'UNKNOWN'