[Bf-blender-cvs] [7a8fd70] fluid-mantaflow: major clean up

Sebastián Barschkis noreply at git.blender.org
Wed May 25 11:28:04 CEST 2016


Commit: 7a8fd7068ef7e82a6e207f264dcebd5844db3f1e
Author: Sebastián Barschkis
Date:   Wed May 25 11:26:56 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB7a8fd7068ef7e82a6e207f264dcebd5844db3f1e

major clean up

- removed deprecated scons setup
- reverted to original code in intern/smoke (new structures are all in
intern/mantaflow)
- minor CMake clean ups

===================================================================

M	.gitignore
M	CMakeLists.txt
D	SConstruct
M	build_files/cmake/macros.cmake
M	intern/ghost/intern/GHOST_ContextCGL.mm
M	intern/smoke/CMakeLists.txt
D	intern/smoke/SConscript
M	intern/smoke/extern/smoke_API.h
M	intern/smoke/intern/FLUID_3D.cpp
M	intern/smoke/intern/FLUID_3D.h
D	intern/smoke/intern/MANTA.cpp
D	intern/smoke/intern/MANTA.h
M	intern/smoke/intern/WTURBULENCE.cpp
M	intern/smoke/intern/WTURBULENCE.h
D	intern/smoke/intern/scenarios/smoke.h
M	intern/smoke/intern/smoke_API.cpp
M	source/blender/blenkernel/CMakeLists.txt
D	source/blender/blenkernel/SConscript
M	source/blender/makesdna/DNA_smoke_types.h
D	source/blender/makesrna/intern/SConscript
D	source/blender/python/SConscript

===================================================================

diff --git a/.gitignore b/.gitignore
index 998f752..1d2d71b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,8 +30,9 @@ Desktop.ini
 # local patches
 /*.patch
 /*.diff
+
 # in-source doc-gen
 /doc/doxygen/html/
 /doc/python_api/sphinx-in-tmp/
 /doc/python_api/sphinx-in/
-/doc/python_api/sphinx-out/.gitignore
+/doc/python_api/sphinx-out/
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 01dfaff..3a5159c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2842,11 +2842,9 @@ if(CMAKE_COMPILER_IS_GNUCC)
 
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_CAST_ALIGN -Wcast-align)
-
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE  -Werror=return-type)
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_VLA -Werror=vla)
-
 	# system headers sometimes do this, disable for now, was: -Werror=strict-prototypes
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_STRICT_PROTOTYPES  -Wstrict-prototypes)
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_MISSING_PROTOTYPES -Wmissing-prototypes)
@@ -2893,7 +2891,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
 	ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_LOGICAL_OP -Wlogical-op)
 	ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_INIT_SELF -Winit-self)  # needs -Wuninitialized
 	ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_MISSING_INCLUDE_DIRS -Wmissing-include-dirs)
-	ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)	
+	ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_DIV_BY_ZERO -Wno-div-by-zero)
 	ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_TYPE_LIMITS -Wtype-limits)
 	ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_RETURN_TYPE  -Werror=return-type)
 	ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
@@ -2932,10 +2930,8 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
 
 	# strange, clang complains these are not supported, but then yses them.
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
-
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_IMPLICIT_FUNCTION_DECLARATION -Werror=implicit-function-declaration)
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ERROR_RETURN_TYPE  -Werror=return-type)
-
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_AUTOLOGICAL_COMPARE -Wno-tautological-compare)
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_UNKNOWN_PRAGMAS -Wno-unknown-pragmas)
 	ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_CHAR_SUBSCRIPTS -Wno-char-subscripts)
diff --git a/SConstruct b/SConstruct
deleted file mode 100644
index 1e3b79c..0000000
--- a/SConstruct
+++ /dev/null
@@ -1,1427 +0,0 @@
-#!/usr/bin/env python
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# The Original Code is Copyright (C) 2006, Blender Foundation
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): Nathan Letwory.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-# Main entry-point for the SCons building system
-# Set up some custom actions and target/argument handling
-# Then read all SConscripts and build
-#
-# TODO: fix /FORCE:MULTIPLE on windows to get proper debug builds.
-# TODO: directory copy functions are far too complicated, see:
-#       http://wiki.blender.org/index.php/User:Ideasman42/SConsNotSimpleInstallingFiles
-
-import sys
-import os
-import os.path
-import string
-import shutil
-import re
-
-# store path to tools and modules
-toolpath=os.path.join(".", "build_files", "scons", "tools")
-modulespath=os.path.join(".", "build_files", "scons", "Modules")
-
-# needed for importing tools and modules
-sys.path.append(toolpath)
-sys.path.append(modulespath)
-
-import Blender
-import btools
-
-EnsureSConsVersion(1,0,0)
-
-# Before we do anything, let's check if we have a sane os.environ
-if not btools.check_environ():
-    Exit()
-
-BlenderEnvironment = Blender.BlenderEnvironment
-B = Blender
-
-VERSION = btools.VERSION # This is used in creating the local config directories
-VERSION_RELEASE_CYCLE = btools.VERSION_RELEASE_CYCLE
-
-### globals ###
-platform = sys.platform
-quickie = None
-quickdebug = None
-
-##### BEGIN SETUP #####
-
-B.possible_types = ['core', 'player', 'player2', 'intern', 'extern', 'system']
-
-B.binarykind = ['blender' , 'blenderplayer']
-##################################
-# target and argument validation #
-##################################
-# XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
-use_color = ARGUMENTS.get('BF_FANCY', '1')
-if platform=='win32':
-    use_color = None
-
-if not use_color=='1':
-    B.bc.disable()
-
- #on defaut white Os X terminal, some colors are totally unlegible
-if platform=='darwin':
-    B.bc.OKGREEN = '\033[34m'
-    B.bc.WARNING = '\033[36m'
-
-# arguments
-print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
-B.arguments = btools.validate_arguments(ARGUMENTS, B.bc)
-btools.print_arguments(B.arguments, B.bc)
-
-# targets
-print B.bc.HEADER+'Command-line targets'+B.bc.ENDC
-B.targets = btools.validate_targets(COMMAND_LINE_TARGETS, B.bc)
-btools.print_targets(B.targets, B.bc)
-
-##########################
-# setting up environment #
-##########################
-
-# handling cmd line arguments & config file
-
-# bitness stuff
-tempbitness = int(B.arguments.get('BF_BITNESS', B.bitness)) # default to bitness found as per starting python
-if tempbitness in B.allowed_bitnesses.values() :
-    B.bitness = tempbitness
-
-# first check cmdline for toolset and we create env to work on
-quickie = B.arguments.get('BF_QUICK', None)
-quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
-
-if quickdebug:
-    B.quickdebug=string.split(quickdebug, ',')
-else:
-    B.quickdebug=[]
-
-if quickie:
-    B.quickie=string.split(quickie,',')
-else:
-    B.quickie=[]
-
-toolset = B.arguments.get('BF_TOOLSET', None)
-vcver = B.arguments.get('MSVS_VERSION', '12.0')
-
-if toolset:
-    print "Using " + toolset
-    if toolset=='mstoolkit':
-        env = BlenderEnvironment(ENV = os.environ)
-        env.Tool('mstoolkit', [toolpath])
-    else:
-        env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
-        if env:
-            btools.SetupSpawn(env)
-else:
-    if B.bitness==64 and platform=='win32':
-        env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64', TARGET_ARCH='x86_64', MSVC_VERSION=vcver)
-    else:
-        env = BlenderEnvironment(ENV = os.environ, TARGET_ARCH='x86', MSVC_VERSION=vcver)
-
-if not env:
-    print "Could not create a build environment"
-    Exit()
-
-cc = B.arguments.get('CC', None)
-cxx = B.arguments.get('CXX', None)
-if cc:
-    env['CC'] = cc
-if cxx:
-    env['CXX'] = cxx
-
-if sys.platform=='win32':
-    if env['CC'] in ['cl', 'cl.exe']:
-        platform = 'win64-vc' if B.bitness == 64 else 'win32-vc'
-    elif env['CC'] in ['gcc']:
-        platform = 'win64-mingw' if B.bitness == 64 else 'win32-mingw'
-
-if 'mingw' in platform:
-    print "Setting custom spawn function"
-    btools.SetupSpawn(env)
-
-env.SConscriptChdir(0)
-
-# Remove major kernel version from linux platform.
-# After Linus switched kernel to new version model this major version
-# shouldn't take much sense for building rules.
-
-if re.match('linux[0-9]+', platform):
-    platform = 'linux'
-
-crossbuild = B.arguments.get('BF_CROSS', None)
-if crossbuild and platform not in ('win32-vc', 'win64-vc'):
-    platform = 'linuxcross'
-
-env['OURPLATFORM'] = platform
-
-configfile = os.path.join("build_files", "scons", "config", platform + "-config.py")
-
-if os.path.exists(configfile):
-    print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
-else:
-    print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
-
-if crossbuild and env['PLATFORM'] != 'win32':
-    print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
-    env.Tool('crossmingw', [toolpath])
-    # todo: determine proper libs/includes etc.
-    # Needed for gui programs, console programs should do without it
-
-    # Now we don't need this option to have console window
-    # env.Append(LINKFLAGS=['-mwindows'])
-
-userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
-# first read platform config. B.arguments will override
-optfiles = [configfile]
-if os.path.exists(userconfig):
-    print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
-    optfiles += [userconfig]
-else:
-    print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
-
-opts = btools.read_opts(env, optfiles, B.arguments)
-opts.Update(env)
-
-if sys.platform=='win32':
-    if B.bitness==64:
-        env.Append(CPPFLAGS=['-DWIN64']) # -DWIN32 needed too, as it's used all over to target Windows generally
-
-if env['BF_DEBUG']:
-    env.Append(CPPDEFINES=['_DEBUG', 'DEBUG'])
-else:
-    env.Append(CPPDEFINES=['NDEBUG'])
-
-if not env['BF_FANCY']:
-    B.bc.disable()
-
-if env['WITH_BF_SDL_DYNLOAD']:
-    env['BF_SDL_INC'] = '#extern/sdlew/include/SDL2'
-
-# remove install dir so old and new files are not mixed.
-# NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
-# TODO: perhaps we need an option (off by default) to not do this altogether...
-if not env['WITHOUT_BF_INSTALL'] and not env['WITHOUT_BF_OVERWRITE_INSTALL']:
-    scriptsDir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts')
-    if os.path.isdir(scriptsDir):
-        print B.bc.OKGREEN + "Clearing installati

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list