Skip to content

Commit

Permalink
add rtti test in configure
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Jul 24, 2013
1 parent 238ead3 commit e67e109
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/configure
Expand Up @@ -546,6 +546,41 @@ EOF
fi
}

check_rtti()
{
cat > $TMPCXX << EOF
class Foo
{
public:
Foo() {};
virtual void dummy() {};
};
class Bar
{
public:
Bar() {};
virtual void dummy() {};
};
int main(int argc, char** argv)
{
Foo* x = new Foo();
Bar* y=dynamic_cast<Bar*>(x);
return ((void*)x)==((void*)y) ? 0 : 1;
}
EOF

echocheck "C++ Runtime Type Information (rtti)"
if cxx_check -Werror -frtti
then
echores "yes"
COMPFLAGS_CPP="$COMPFLAGS_CPP -frtti"
else
echores "no"
fi
}


check_gmock()
{
Expand Down Expand Up @@ -5645,6 +5680,7 @@ detect_cc
determine_system_name
check_fpic
check_cxx11
check_rtti
check_makedepend
check_python
check_pkg_config
Expand Down

0 comments on commit e67e109

Please sign in to comment.