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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-02 20:17:05 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-02 20:17:05 +0400
commit2f453773f6b4cd0a03f5e2d9876ee250b87871f0 (patch)
tree08c4bb2c1c3ee3fe5131e46a4e39b9224ba5c251 /build_files
parent02fae3440c8b4b89aa0f9412bc4e0db60a787c13 (diff)
parente1594ebb3c52f573a8a6c90f3d30acfb3de6e8a5 (diff)
Cycles: svn merge -r41266:41467 ^/trunk/blender
Diffstat (limited to 'build_files')
-rwxr-xr-xbuild_files/cmake/cmake_consistency_check.py2
-rw-r--r--build_files/cmake/cmake_consistency_check_config.py6
-rwxr-xr-xbuild_files/cmake/cmake_qtcreator_project.py23
-rw-r--r--build_files/cmake/macros.cmake54
-rwxr-xr-xbuild_files/cmake/project_info.py22
-rw-r--r--build_files/cmake/project_source_info.py2
-rw-r--r--build_files/scons/config/darwin-config.py2
-rw-r--r--build_files/scons/tools/btools.py8
8 files changed, 96 insertions, 23 deletions
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py
index f4a6e88df45..b1fc88bfe26 100755
--- a/build_files/cmake/cmake_consistency_check.py
+++ b/build_files/cmake/cmake_consistency_check.py
@@ -74,7 +74,7 @@ def is_c_header(filename):
def is_c(filename):
ext = splitext(filename)[1]
- return (ext in (".c", ".cpp", ".cxx", ".m", ".mm", ".rc"))
+ return (ext in (".c", ".cpp", ".cxx", ".m", ".mm", ".rc", ".cc", ".inl"))
def is_c_any(filename):
diff --git a/build_files/cmake/cmake_consistency_check_config.py b/build_files/cmake/cmake_consistency_check_config.py
index 86f51273ff5..a6215b40ae8 100644
--- a/build_files/cmake/cmake_consistency_check_config.py
+++ b/build_files/cmake/cmake_consistency_check_config.py
@@ -29,8 +29,8 @@ IGNORE = (
"source/blender/imbuf/intern/imbuf_cocoa.m",
"extern/recastnavigation/Recast/Source/RecastLog.cpp",
"extern/recastnavigation/Recast/Source/RecastTimer.cpp",
- "entern/audaspace/SRC/AUD_SRCResampleFactory.cpp",
- "entern/audaspace/SRC/AUD_SRCResampleReader.cpp",
+ "intern/audaspace/SRC/AUD_SRCResampleFactory.cpp",
+ "intern/audaspace/SRC/AUD_SRCResampleReader.cpp",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h",
"extern/bullet2/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h",
@@ -44,7 +44,7 @@ IGNORE = (
"extern/eltopo/common/meshes/ObjLoader.hpp",
"extern/eltopo/common/meshes/TriangleIndex.hpp",
"extern/eltopo/common/meshes/meshloader.h",
- "extern/eltopo/eltopo3d/broadphase_blenderbvh.h"
+ "extern/eltopo/eltopo3d/broadphase_blenderbvh.h",
"extern/recastnavigation/Recast/Include/RecastLog.h",
"extern/recastnavigation/Recast/Include/RecastTimer.h",
"intern/audaspace/SRC/AUD_SRCResampleFactory.h",
diff --git a/build_files/cmake/cmake_qtcreator_project.py b/build_files/cmake/cmake_qtcreator_project.py
index fc5c00ec2ec..a89bcd01523 100755
--- a/build_files/cmake/cmake_qtcreator_project.py
+++ b/build_files/cmake/cmake_qtcreator_project.py
@@ -40,6 +40,7 @@ from project_info import (SIMPLE_PROJECTFILE,
is_py,
cmake_advanced_info,
cmake_compiler_defines,
+ project_name_get,
)
import os
@@ -59,7 +60,8 @@ def create_qtc_project_main():
f.write("\n".join(files_rel))
f = open(os.path.join(PROJECT_DIR, "%s.includes" % PROJECT_NAME), 'w')
- f.write("\n".join(sorted(list(set(os.path.dirname(f) for f in files_rel if is_c_header(f))))))
+ f.write("\n".join(sorted(list(set(os.path.dirname(f)
+ for f in files_rel if is_c_header(f))))))
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % PROJECT_NAME)
f = open(qtc_prj, 'w')
@@ -73,10 +75,16 @@ def create_qtc_project_main():
includes, defines = cmake_advanced_info()
# for some reason it doesnt give all internal includes
- includes = list(set(includes) | set(os.path.dirname(f) for f in files_rel if is_c_header(f)))
+ includes = list(set(includes) | set(os.path.dirname(f)
+ for f in files_rel if is_c_header(f)))
includes.sort()
- PROJECT_NAME = "Blender"
+ if 0:
+ PROJECT_NAME = "Blender"
+ else:
+ # be tricky, get the project name from SVN if we can!
+ PROJECT_NAME = project_name_get(SOURCE_DIR)
+
FILE_NAME = PROJECT_NAME.lower()
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
f.write("\n".join(files_rel))
@@ -93,7 +101,7 @@ def create_qtc_project_main():
f.write("// ADD PREDEFINED MACROS HERE!\n")
defines_final = [("#define %s %s" % item) for item in defines]
if sys.platform != "win32":
- defines_final += cmake_compiler_defines() # defines from the compiler
+ defines_final += cmake_compiler_defines()
f.write("\n".join(defines_final))
print("Blender project file written to: %s" % qtc_prj)
@@ -106,7 +114,12 @@ def create_qtc_project_python():
files_rel.sort()
# --- qtcreator specific, simple format
- PROJECT_NAME = "Blender_Python"
+ if 0:
+ PROJECT_NAME = "Blender_Python"
+ else:
+ # be tricky, get the project name from SVN if we can!
+ PROJECT_NAME = project_name_get(SOURCE_DIR) + "_Python"
+
FILE_NAME = PROJECT_NAME.lower()
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
f.write("\n".join(files_rel))
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 58107fe7687..c9a04f87148 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -16,7 +16,7 @@ macro(file_suffix
unset(_file_name_EXT)
endmacro()
-# usefil for adding debug suffix to library lists:
+# useful for adding debug suffix to library lists:
# /somepath/foo.lib --> /somepath/foo_d.lib
macro(file_list_suffix
fp_list_new fp_list fn_suffix
@@ -389,7 +389,7 @@ endmacro()
# needs to be removed for some external libs which we dont maintain.
# utility macro
-macro(remove_flag
+macro(remove_cc_flag
flag)
string(REGEX REPLACE ${flag} "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
@@ -406,16 +406,26 @@ macro(remove_flag
endmacro()
+macro(add_cc_flag
+ flag)
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
+endmacro()
+
macro(remove_strict_flags)
if(CMAKE_COMPILER_IS_GNUCC)
- remove_flag("-Wstrict-prototypes")
- remove_flag("-Wunused-parameter")
- remove_flag("-Wwrite-strings")
- remove_flag("-Wundef")
- remove_flag("-Wshadow")
- remove_flag("-Werror=[^ ]+")
- remove_flag("-Werror")
+ remove_cc_flag("-Wstrict-prototypes")
+ remove_cc_flag("-Wunused-parameter")
+ remove_cc_flag("-Wwrite-strings")
+ remove_cc_flag("-Wundef")
+ remove_cc_flag("-Wshadow")
+ remove_cc_flag("-Werror=[^ ]+")
+ remove_cc_flag("-Werror")
+
+ # negate flags implied by '-Wall'
+ add_cc_flag("${CC_REMOVE_STRICT_FLAGS}")
endif()
if(MSVC)
@@ -424,6 +434,32 @@ macro(remove_strict_flags)
endmacro()
+# note, we can only append flags on a single file so we need to negate the options.
+# at the moment we cant shut up ffmpeg deprecations, so use this, but will
+# probably add more removals here.
+macro(remove_strict_flags_file
+ filenames)
+
+ foreach(_SOURCE ${ARGV})
+
+ if(CMAKE_COMPILER_IS_GNUCC)
+ set_source_files_properties(${_SOURCE}
+ PROPERTIES
+ COMPILE_FLAGS "${CC_REMOVE_STRICT_FLAGS}"
+ )
+ endif()
+
+ if(MSVC)
+ # TODO
+ endif()
+
+ endforeach()
+
+ unset(_SOURCE)
+
+endmacro()
+
+
macro(ADD_CHECK_C_COMPILER_FLAG
_CFLAGS
_CACHE_VAR
diff --git a/build_files/cmake/project_info.py b/build_files/cmake/project_info.py
index f57778f9858..da1f2087f4f 100755
--- a/build_files/cmake/project_info.py
+++ b/build_files/cmake/project_info.py
@@ -41,6 +41,7 @@ __all__ = (
"is_py",
"cmake_advanced_info",
"cmake_compiler_defines",
+ "project_name_get"
)
import sys
@@ -104,7 +105,7 @@ def is_glsl(filename):
def is_c(filename):
ext = splitext(filename)[1]
- return (ext in (".c", ".cpp", ".cxx", ".m", ".mm", ".rc", ".cc"))
+ return (ext in (".c", ".cpp", ".cxx", ".m", ".mm", ".rc", ".cc", ".inl"))
def is_c_any(filename):
@@ -215,3 +216,22 @@ def cmake_compiler_defines():
os.remove(temp_c)
os.remove(temp_def)
return lines
+
+
+def project_name_get(path, fallback="Blender", prefix="Blender_"):
+ if not os.path.isdir(os.path.join(path, ".svn")):
+ return fallback
+
+ import subprocess
+ info = subprocess.Popen(["svn", "info", path],
+ stdout=subprocess.PIPE).communicate()[0].decode()
+
+ for l in info.split("\n"):
+ l = l.strip()
+ if l.startswith("URL"):
+ # https://svn.blender.org/svnroot/bf-blender/branches/bmesh/blender
+ # --> bmesh
+ if "/branches/" in l:
+ return prefix + l.rsplit("/branches/", 1)[-1].split("/", 1)[0]
+ return fallback
+
diff --git a/build_files/cmake/project_source_info.py b/build_files/cmake/project_source_info.py
index 501cdd1e1fe..5d646eea2c1 100644
--- a/build_files/cmake/project_source_info.py
+++ b/build_files/cmake/project_source_info.py
@@ -40,7 +40,7 @@ def is_c_header(filename):
def is_c(filename):
ext = os.path.splitext(filename)[1]
- return (ext in (".c", ".cpp", ".cxx", ".m", ".mm", ".rc"))
+ return (ext in (".c", ".cpp", ".cxx", ".m", ".mm", ".rc", ".cc", ".inl"))
def is_c_any(filename):
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py
index deb3d01febd..38c8dca6cd2 100644
--- a/build_files/scons/config/darwin-config.py
+++ b/build_files/scons/config/darwin-config.py
@@ -336,7 +336,7 @@ else:
# some flags shuffling for different OS versions
if MAC_MIN_VERS == '10.3':
- CCFLAGS = ['-fuse-cxa-atexit'] + CFLAGS
+ CCFLAGS = ['-fuse-cxa-atexit'] + CCFLAGS
PLATFORM_LINKFLAGS = ['-fuse-cxa-atexit'] + PLATFORM_LINKFLAGS
LLIBS.append('crt3.o')
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index 49efa598ed8..a678bc68f54 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -150,7 +150,9 @@ def validate_arguments(args, bc):
'BF_GHOST_DEBUG',
'WITH_BF_RAYOPTIMIZATION',
'BF_RAYOPTIMIZATION_SSE_FLAGS',
- 'BF_NO_ELBEEM',
+ 'WITH_BF_FLUID',
+ 'WITH_BF_DECIMATE',
+ 'WITH_BF_BOOLEAN',
'WITH_BF_CXX_GUARDEDALLOC',
'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
'BUILDBOT_BRANCH', 'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC'
@@ -250,7 +252,9 @@ def read_opts(env, cfg, args):
(BoolVariable('WITH_OSX_STATICPYTHON', 'Staticly link to python', True)),
('BF_PYTHON_ABI_FLAGS', 'Python ABI flags (suffix in library version: m, mu, etc)', ''),
- (BoolVariable('BF_NO_ELBEEM', 'Disable Fluid Sim', False)),
+ (BoolVariable('WITH_BF_FLUID', 'Build with Fluid simulation (Elbeem)', True)),
+ (BoolVariable('WITH_BF_DECIMATE', 'Build with decimate modifier', True)),
+ (BoolVariable('WITH_BF_BOOLEAN', 'Build with boolean modifier', True)),
('BF_PROFILE_FLAGS', 'Profiling compiler flags', ''),
(BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)),
('BF_OPENAL', 'base path for OpenAL', ''),