build: disable rtti for release builds
This commit is contained in:
parent
98ef67fa8d
commit
0283c6b0f9
@ -61,6 +61,8 @@ AC_DEFUN([NC_DEBUGGING],[
|
|||||||
NC_APPEND_ONE_COMPILE_FLAG([-O0])
|
NC_APPEND_ONE_COMPILE_FLAG([-O0])
|
||||||
], [
|
], [
|
||||||
AX_APPEND_COMPILE_FLAGS([-O2])
|
AX_APPEND_COMPILE_FLAGS([-O2])
|
||||||
|
AX_APPEND_COMPILE_FLAGS([-fno-rtti])
|
||||||
|
AC_DEFINE([NO_RTTI], [], [RTTI disabled])
|
||||||
])
|
])
|
||||||
|
|
||||||
##-------------------------------------------------------------------------
|
##-------------------------------------------------------------------------
|
||||||
|
@ -26,6 +26,7 @@ main ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
#if !defined(NO_RTTI)
|
||||||
auto tuple = std::make_tuple (1u, 1, 1.f, 1.);
|
auto tuple = std::make_tuple (1u, 1, 1.f, 1.);
|
||||||
std::vector<std::type_index> expected {
|
std::vector<std::type_index> expected {
|
||||||
std::type_index (typeid (1u)),
|
std::type_index (typeid (1u)),
|
||||||
@ -40,8 +41,12 @@ main ()
|
|||||||
});
|
});
|
||||||
|
|
||||||
tap.expect_eq (actual, expected, "type iteration");
|
tap.expect_eq (actual, expected, "type iteration");
|
||||||
|
#else
|
||||||
|
tap.skip ("type iteration");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
using src_t = std::tuple<std::string>;
|
using src_t = std::tuple<std::string>;
|
||||||
using dst_t = typename util::tuple::map<src_t, int_mapper>::type;
|
using dst_t = typename util::tuple::map<src_t, int_mapper>::type;
|
||||||
|
Loading…
Reference in New Issue
Block a user