disable exeptions in cmake
This commit is contained in:
@@ -97,8 +97,10 @@ public:
|
|||||||
{
|
{
|
||||||
int code = lua_pcall (L, nargs, nresults, msgh);
|
int code = lua_pcall (L, nargs, nresults, msgh);
|
||||||
|
|
||||||
if (code != LUABRIDGE_LUA_OK)
|
if (code != LUABRIDGE_LUA_OK) {
|
||||||
Throw (LuaException (L, code));
|
// Throw (LuaException (L, code));
|
||||||
|
assert(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@@ -128,7 +130,8 @@ protected:
|
|||||||
private:
|
private:
|
||||||
static int throwAtPanic (lua_State* L)
|
static int throwAtPanic (lua_State* L)
|
||||||
{
|
{
|
||||||
throw LuaException (L, -1);
|
// throw LuaException (L, -1);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,8 @@ protected:
|
|||||||
{
|
{
|
||||||
if (m_stackSize == 0)
|
if (m_stackSize == 0)
|
||||||
{
|
{
|
||||||
throw std::logic_error ("Unable to continue registration");
|
std::cerr << ("Unable to continue registration");
|
||||||
|
assert(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1054,7 +1055,8 @@ public:
|
|||||||
{
|
{
|
||||||
if (m_stackSize == 1)
|
if (m_stackSize == 1)
|
||||||
{
|
{
|
||||||
throw std::logic_error ("endNamespace () called on global namespace");
|
std::cerr << ("endNamespace () called on global namespace");
|
||||||
|
assert(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert (m_stackSize > 1);
|
assert (m_stackSize > 1);
|
||||||
@@ -1150,7 +1152,8 @@ public:
|
|||||||
{
|
{
|
||||||
if (m_stackSize == 1)
|
if (m_stackSize == 1)
|
||||||
{
|
{
|
||||||
throw std::logic_error ("addProperty () called on global namespace");
|
std::cerr << ("addProperty () called on global namespace");
|
||||||
|
assert(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert (lua_istable (L, -1)); // Stack: namespace table (ns)
|
assert (lua_istable (L, -1)); // Stack: namespace table (ns)
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
namespace luabridge {
|
namespace luabridge {
|
||||||
@@ -320,7 +321,8 @@ public:
|
|||||||
lua_rawgetp (L, LUA_REGISTRYINDEX, ClassInfo <T>::getClassKey ());
|
lua_rawgetp (L, LUA_REGISTRYINDEX, ClassInfo <T>::getClassKey ());
|
||||||
if (!lua_istable (L, -1))
|
if (!lua_istable (L, -1))
|
||||||
{
|
{
|
||||||
throw std::logic_error ("The class is not registered in LuaBridge");
|
std::cerr << ("The class is not registered in LuaBridge");
|
||||||
|
assert(true);
|
||||||
}
|
}
|
||||||
lua_setmetatable (L, -2);
|
lua_setmetatable (L, -2);
|
||||||
return ud;
|
return ud;
|
||||||
@@ -375,7 +377,8 @@ private:
|
|||||||
lua_rawgetp (L, LUA_REGISTRYINDEX, key);
|
lua_rawgetp (L, LUA_REGISTRYINDEX, key);
|
||||||
if (!lua_istable (L, -1))
|
if (!lua_istable (L, -1))
|
||||||
{
|
{
|
||||||
throw std::logic_error ("The class is not registered in LuaBridge");
|
std::cerr << ("The class is not registered in LuaBridge");
|
||||||
|
assert(true);
|
||||||
}
|
}
|
||||||
lua_setmetatable (L, -2);
|
lua_setmetatable (L, -2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ if(WIN32)
|
|||||||
set(CMAKE_CXX_FLAGS "/O2 /Ob2 /Ot /W0")
|
set(CMAKE_CXX_FLAGS "/O2 /Ob2 /Ot /W0")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fno-exceptions")
|
||||||
if(DEFINED ENV{QNX_HOST} OR PIP_FREERTOS)
|
if(DEFINED ENV{QNX_HOST} OR PIP_FREERTOS)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-32")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-depth-32")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -726,6 +726,7 @@ inline bool piDeleteSafety(T *& pointer) {
|
|||||||
//! \~english In this example "Error!" will be printed on every \b false function return.
|
//! \~english In this example "Error!" will be printed on every \b false function return.
|
||||||
//! \~russian В данном примере будет выведен "Error!" при каждом \b false возврате из функции.
|
//! \~russian В данном примере будет выведен "Error!" при каждом \b false возврате из функции.
|
||||||
class PIP_EXPORT PIScopeExitCall {
|
class PIP_EXPORT PIScopeExitCall {
|
||||||
|
NO_COPY_CLASS(PIScopeExitCall)
|
||||||
public:
|
public:
|
||||||
//! \~\brief
|
//! \~\brief
|
||||||
//! \~english Constructor that takes a function to execute
|
//! \~english Constructor that takes a function to execute
|
||||||
@@ -758,8 +759,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NO_COPY_CLASS(PIScopeExitCall)
|
|
||||||
|
|
||||||
std::function<void()> func;
|
std::function<void()> func;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -768,14 +767,14 @@ private:
|
|||||||
//! \~english Inherit from this class to make your class non-trivially copyable.
|
//! \~english Inherit from this class to make your class non-trivially copyable.
|
||||||
//! \~russian Наследуйтесь от этого класса чтобы сделать свой класс нетривиально копируемым.
|
//! \~russian Наследуйтесь от этого класса чтобы сделать свой класс нетривиально копируемым.
|
||||||
struct PIP_EXPORT PINonTriviallyCopyable {
|
struct PIP_EXPORT PINonTriviallyCopyable {
|
||||||
PINonTriviallyCopyable() noexcept = default;
|
PINonTriviallyCopyable() = default;
|
||||||
PINonTriviallyCopyable(const PINonTriviallyCopyable &) noexcept = default;
|
PINonTriviallyCopyable(const PINonTriviallyCopyable &) = default;
|
||||||
PINonTriviallyCopyable(PINonTriviallyCopyable &&) noexcept;
|
PINonTriviallyCopyable(PINonTriviallyCopyable &&) ;
|
||||||
PINonTriviallyCopyable & operator=(const PINonTriviallyCopyable &) noexcept = default;
|
PINonTriviallyCopyable & operator=(const PINonTriviallyCopyable &) = default;
|
||||||
PINonTriviallyCopyable & operator=(PINonTriviallyCopyable &&) noexcept = default;
|
PINonTriviallyCopyable & operator=(PINonTriviallyCopyable &&) = default;
|
||||||
~PINonTriviallyCopyable() = default;
|
~PINonTriviallyCopyable() = default;
|
||||||
};
|
};
|
||||||
inline PINonTriviallyCopyable::PINonTriviallyCopyable(PINonTriviallyCopyable &&) noexcept = default;
|
inline PINonTriviallyCopyable::PINonTriviallyCopyable(PINonTriviallyCopyable &&) = default;
|
||||||
|
|
||||||
|
|
||||||
//! \~\brief
|
//! \~\brief
|
||||||
|
|||||||
Reference in New Issue
Block a user