diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-08-18 07:24:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-08-18 07:24:46 +0400 |
commit | 0dad5cfbcafeaa45b59b581dc217fe2ebd297f2d (patch) | |
tree | 4fc8452da587d4d103a8a25512a778299c29ed0e /source | |
parent | ca20107edb7e80a9a87f1e7a3a38ae2ed63a3d4b (diff) |
CMake/Warnings
* WITH_GAMEENGINE and WITH_BULLET were being added to the compiler flags, only define in areas that use them.
* removed C++ unix warnings by adding -Wno-invalid-offsetof -Wno-sign-compare. the py api uses invalid offsets for attributes.
* removed C unix -Wnested-externs warning, these are everywhere in blender.
* removed unused BGE python headers
* undefine _XOPEN_SOURCE and _POSIX_C_SOURCE in the BGE, python redefines.
* renamed USE_BULLET in collision.c to WITH_BULLET for consistency
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/CMakeLists.txt | 10 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/collision.c | 4 | ||||
-rw-r--r-- | source/blender/editors/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/gameengine/Expressions/KX_Python.h | 11 | ||||
-rw-r--r-- | source/gameengine/Expressions/KX_Python_dynamic.h | 36 | ||||
-rw-r--r-- | source/gameengine/Expressions/KX_Python_static.h | 36 |
7 files changed, 28 insertions, 77 deletions
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index c1dfc2cf639..08d0d40f5be 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -30,14 +30,18 @@ SET(INC . ../../../intern/guardedalloc ../../../intern/memutil ../editors/include ../blenlib ../makesdna ../render/extern/include ../../../intern/decimation/extern ../imbuf ../avi ../../../intern/elbeem/extern ../../../intern/opennl/extern - ../../../intern/iksolver/extern ../blenloader ../quicktime - ../../../extern/bullet2/src + ../../../intern/iksolver/extern ../blenloader ../nodes ../../../extern/glew/include ../gpu ../makesrna ../../../intern/smoke/extern ../../../intern/bsp/extern ../../../intern/audaspace/intern ${ZLIB_INC} ) +IF(WITH_BULLET) + SET(INC ${INC} ../../../extern/bullet2/src) + ADD_DEFINITIONS(-DWITH_BULLET) +ENDIF(WITH_BULLET) + IF(WITH_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) ENDIF(WITH_OPENEXR) @@ -51,7 +55,7 @@ IF(WITH_DDS) ENDIF(WITH_DDS) IF(WITH_QUICKTIME) - SET(INC ${INC} ${QUICKTIME_INC}) + SET(INC ${INC} ../quicktime ${QUICKTIME_INC}) ADD_DEFINITIONS(-DWITH_QUICKTIME) ENDIF(WITH_QUICKTIME) diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index c122145c98f..37e9c93a108 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -591,7 +591,7 @@ CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap ClothModifierData *clmd = ( ClothModifierData * ) md1; CollisionModifierData *collmd = ( CollisionModifierData * ) md2; MFace *face1=NULL, *face2 = NULL; -#ifdef WITH_BULLET +#ifdef USE_BULLET ClothVertex *verts1 = clmd->clothObject->verts; #endif double distance = 0; @@ -669,7 +669,7 @@ CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap break; } -#ifdef WITH_BULLET +#ifdef USE_BULLET // calc distance + normal distance = plNearestPoints ( verts1[collpair->ap1].txold, verts1[collpair->ap2].txold, verts1[collpair->ap3].txold, collmd->current_x[collpair->bp1].co, collmd->current_x[collpair->bp2].co, collmd->current_x[collpair->bp3].co, collpair->pa,collpair->pb,collpair->vector ); diff --git a/source/blender/editors/CMakeLists.txt b/source/blender/editors/CMakeLists.txt index fc28e21ab8f..96b6fa5b7ab 100644 --- a/source/blender/editors/CMakeLists.txt +++ b/source/blender/editors/CMakeLists.txt @@ -42,6 +42,10 @@ SET(INC ../windowmanager ../blenfont ) +IF(WITH_GAMEENGINE) + ADD_DEFINITIONS(-DGAMEBLENDER) +ENDIF(WITH_GAMEENGINE) + IF(WITH_INTERNATIONAL) ADD_DEFINITIONS(-DINTERNATIONAL) ENDIF(WITH_INTERNATIONAL) diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 343df04d4ff..152f4031b91 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -42,6 +42,10 @@ SET(SRC INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../windowmanager ../../editors/include ../../imbuf ../../render/extern/include .) FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h) +IF(WITH_GAMEENGINE) + ADD_DEFINITIONS(-DGAMEBLENDER) +ENDIF(WITH_GAMEENGINE) + IF(WITH_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) ENDIF(WITH_OPENEXR) diff --git a/source/gameengine/Expressions/KX_Python.h b/source/gameengine/Expressions/KX_Python.h index 61f7ef05042..f41accec730 100644 --- a/source/gameengine/Expressions/KX_Python.h +++ b/source/gameengine/Expressions/KX_Python.h @@ -30,6 +30,17 @@ #define KX_PYTHON_H //#define USE_DL_EXPORT + +/* python redefines, quiet the compiler */ +#ifdef _XOPEN_SOURCE +#undef _XOPEN_SOURCE +#endif + +#ifdef _POSIX_C_SOURCE +#undef _POSIX_C_SOURCE +#endif + + #include "Python.h" #define USE_MATHUTILS // Blender 2.5x api will use mathutils, for a while we might want to test without it diff --git a/source/gameengine/Expressions/KX_Python_dynamic.h b/source/gameengine/Expressions/KX_Python_dynamic.h deleted file mode 100644 index eb435bdf1c3..00000000000 --- a/source/gameengine/Expressions/KX_Python_dynamic.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * $Id$ - * - * ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ -#ifndef KX_PYTHON_H -#define KX_PYTHON_H - -//#define USE_DL_EXPORT -#include "Python.h" - -#endif // KX_PYTHON_H - diff --git a/source/gameengine/Expressions/KX_Python_static.h b/source/gameengine/Expressions/KX_Python_static.h deleted file mode 100644 index f4f31f9b058..00000000000 --- a/source/gameengine/Expressions/KX_Python_static.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * $Id$ - * - * ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * - * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. - * All rights reserved. - * - * The Original Code is: all of this file. - * - * Contributor(s): none yet. - * - * ***** END GPL LICENSE BLOCK ***** - */ -#ifndef KX_PYTHON_H -#define KX_PYTHON_H - -#define USE_DL_EXPORT -#include "Python.h" - -#endif // KX_PYTHON_H - |