- ghost-sdl builds again.
- without python builds without warnings. - replace MAXFLOAT -> FLT_MAX in some areas, MAXFLOAT overflows (lager then float range). - add cmake option WITH_GCC_MUDFLAP to enable libmudflap use.
This commit is contained in:
@@ -278,6 +278,10 @@ mark_as_advanced(WITH_ASSERT_ABORT)
|
||||
|
||||
option(WITH_BOOST "Enable features depending no boost" ON)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
option(WITH_GCC_MUDFLAP "Enable mudflap" OFF)
|
||||
mark_as_advanced(WITH_GCC_MUDFLAP)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
cmake_minimum_required(VERSION 2.8.8)
|
||||
@@ -2036,7 +2040,7 @@ if(WITH_PYTHON)
|
||||
|
||||
if(WITH_PYTHON_INSTALL AND WITH_PYTHON_INSTALL_NUMPY)
|
||||
# set but invalid
|
||||
# -- disabled until we make numpy bundled with blender - campbell
|
||||
# -- disabled until we make numpy bundled with blender - campbell
|
||||
if((NOT ${PYTHON_NUMPY_PATH} STREQUAL "") AND (NOT ${PYTHON_NUMPY_PATH} MATCHES NOTFOUND))
|
||||
# if(NOT EXISTS "${PYTHON_NUMPY_PATH}/numpy")
|
||||
# message(WARNING "PYTHON_NUMPY_PATH is invalid, numpy not found in '${PYTHON_NUMPY_PATH}' "
|
||||
@@ -2080,6 +2084,13 @@ if(WITH_PYTHON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_GCC_MUDFLAP)
|
||||
set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -fmudflapth -funwind-tables")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lpthread -lmudflapth -rdynamic")
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_ERROR_MUDFLAP -Wno-error=mudflap)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_ERROR_MUDFLAP -Wno-error=mudflap)
|
||||
endif()
|
||||
|
||||
# Include warnings first, so its possible to disable them with user defined flags
|
||||
# eg: -Wno-uninitialized
|
||||
set(CMAKE_C_FLAGS "${C_WARNINGS} ${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS}")
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "GHOST_SystemSDL.h"
|
||||
#include "GHOST_WindowSDL.h"
|
||||
|
||||
#include "GHOST_WindowManager.h"
|
||||
|
||||
@@ -66,14 +67,19 @@ GHOST_SystemSDL::createWindow(const STR_String& title,
|
||||
GHOST_TUns32 height,
|
||||
GHOST_TWindowState state,
|
||||
GHOST_TDrawingContextType type,
|
||||
bool stereoVisual,
|
||||
const bool stereoVisual,
|
||||
const bool exclusive,
|
||||
const GHOST_TUns16 numOfAASamples,
|
||||
const GHOST_TEmbedderWindowID parentWindow
|
||||
)
|
||||
{
|
||||
GHOST_WindowSDL *window = NULL;
|
||||
|
||||
window = new GHOST_WindowSDL(this, title, left, top, width, height, state, parentWindow, type, stereoVisual, numOfAASamples);
|
||||
window = new GHOST_WindowSDL(this, title,
|
||||
left, top, width, height,
|
||||
state, parentWindow, type,
|
||||
stereoVisual, exclusive,
|
||||
numOfAASamples);
|
||||
|
||||
if (window) {
|
||||
if (GHOST_kWindowStateFullScreen == state) {
|
||||
|
@@ -108,9 +108,10 @@ private:
|
||||
GHOST_TUns32 height,
|
||||
GHOST_TWindowState state,
|
||||
GHOST_TDrawingContextType type,
|
||||
bool stereoVisual,
|
||||
const GHOST_TUns16 numOfAASamples,
|
||||
const GHOST_TEmbedderWindowID parentWindow
|
||||
const bool stereoVisual,
|
||||
const bool exclusive = false,
|
||||
const GHOST_TUns16 numOfAASamples = 0,
|
||||
const GHOST_TEmbedderWindowID parentWindow = 0
|
||||
);
|
||||
|
||||
/* SDL specific */
|
||||
|
@@ -41,10 +41,11 @@ GHOST_WindowSDL::GHOST_WindowSDL(GHOST_SystemSDL *system,
|
||||
const GHOST_TEmbedderWindowID parentWindow,
|
||||
GHOST_TDrawingContextType type,
|
||||
const bool stereoVisual,
|
||||
const bool exclusive,
|
||||
const GHOST_TUns16 numOfAASamples
|
||||
)
|
||||
:
|
||||
GHOST_Window(width, height, state, type, stereoVisual, numOfAASamples),
|
||||
GHOST_Window(width, height, state, type, stereoVisual, exclusive, numOfAASamples),
|
||||
m_system(system),
|
||||
m_invalid_window(false),
|
||||
m_sdl_custom_cursor(NULL)
|
||||
|
@@ -41,6 +41,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
class STR_String;
|
||||
class GHOST_SystemSDL;
|
||||
|
||||
class GHOST_WindowSDL : public GHOST_Window
|
||||
{
|
||||
@@ -64,9 +65,10 @@ public:
|
||||
GHOST_TUns32 width, GHOST_TUns32 height,
|
||||
GHOST_TWindowState state,
|
||||
const GHOST_TEmbedderWindowID parentWindow,
|
||||
GHOST_TDrawingContextType type,
|
||||
const bool stereoVisual,
|
||||
const GHOST_TUns16 numOfAASamples
|
||||
GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone,
|
||||
const bool stereoVisual = false,
|
||||
const bool exclusive = false,
|
||||
const GHOST_TUns16 numOfAASamples = 0
|
||||
);
|
||||
|
||||
~GHOST_WindowSDL();
|
||||
@@ -166,6 +168,11 @@ protected:
|
||||
return GHOST_kSuccess;
|
||||
}
|
||||
|
||||
// TODO
|
||||
GHOST_TSuccess beginFullScreen() const { return GHOST_kFailure; }
|
||||
|
||||
GHOST_TSuccess endFullScreen() const { return GHOST_kFailure; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@@ -195,7 +195,7 @@ static void layerCopy_bmesh_elem_py_ptr(const void *UNUSED(source), void *dest,
|
||||
}
|
||||
|
||||
#ifndef WITH_PYTHON
|
||||
void bpy_bm_generic_invalidate(void *UNUSED(self))
|
||||
void bpy_bm_generic_invalidate(struct BPy_BMGeneric *UNUSED(self))
|
||||
{
|
||||
/* dummy */
|
||||
}
|
||||
@@ -203,8 +203,6 @@ void bpy_bm_generic_invalidate(void *UNUSED(self))
|
||||
|
||||
static void layerFree_bmesh_elem_py_ptr(void *data, int count, int size)
|
||||
{
|
||||
extern void bpy_bm_generic_invalidate(void *self);
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < count; ++i) {
|
||||
|
@@ -252,6 +252,9 @@ enum {
|
||||
* not have functions clobber them */
|
||||
};
|
||||
|
||||
struct BPy_BMGeneric;
|
||||
extern void bpy_bm_generic_invalidate(struct BPy_BMGeneric *self);
|
||||
|
||||
/* defines */
|
||||
#define BM_ELEM_CD_GET_VOID_P(ele, offset) \
|
||||
(assert(offset != -1), (void *)((char *)(ele)->head.data + (offset)))
|
||||
|
@@ -247,8 +247,6 @@ void BM_mesh_free(BMesh *bm)
|
||||
if (bm->py_handle) {
|
||||
/* keep this out of 'BM_mesh_data_free' because we want python
|
||||
* to be able to clear the mesh and maintain access. */
|
||||
extern void bpy_bm_generic_invalidate(void *self);
|
||||
|
||||
bpy_bm_generic_invalidate(bm->py_handle);
|
||||
bm->py_handle = NULL;
|
||||
}
|
||||
|
@@ -1171,7 +1171,7 @@ static void mouse_mesh_loop(bContext *C, const int mval[2], short extend, short
|
||||
/* Select the face of eed which is the nearest of mouse. */
|
||||
BMFace *f, *efa = NULL;
|
||||
BMIter iterf;
|
||||
float best_dist = MAXFLOAT;
|
||||
float best_dist = FLT_MAX;
|
||||
|
||||
/* We can't be sure this has already been set... */
|
||||
ED_view3d_init_mats_rv3d(vc.obedit, vc.rv3d);
|
||||
|
@@ -1293,7 +1293,7 @@ static void calc_distanceCurveVerts(TransData *head, TransData *tail)
|
||||
}
|
||||
}
|
||||
else {
|
||||
td->dist = MAXFLOAT;
|
||||
td->dist = FLT_MAX;
|
||||
td->flag |= TD_NOTCONNECTED;
|
||||
}
|
||||
}
|
||||
@@ -2131,7 +2131,7 @@ static void createTransEditVerts(TransInfo *t)
|
||||
}
|
||||
else {
|
||||
tob->flag |= TD_NOTCONNECTED;
|
||||
tob->dist = MAXFLOAT;
|
||||
tob->dist = FLT_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2367,7 +2367,7 @@ static void UVsToTransData(SpaceImage *sima, TransData *td, TransData2D *td2d, f
|
||||
td->dist = 0.0;
|
||||
}
|
||||
else {
|
||||
td->dist = MAXFLOAT;
|
||||
td->dist = FLT_MAX;
|
||||
}
|
||||
unit_m3(td->mtx);
|
||||
unit_m3(td->smtx);
|
||||
@@ -3504,7 +3504,7 @@ static void bezt_to_transdata(TransData *td, TransData2D *td2d, AnimData *adt, B
|
||||
td->dist = 0.0f;
|
||||
}
|
||||
else
|
||||
td->dist = MAXFLOAT;
|
||||
td->dist = FLT_MAX;
|
||||
|
||||
if (ishandle)
|
||||
td->flag |= TD_NOTIMESNAP;
|
||||
|
Reference in New Issue
Block a user