mirror of
https://github.com/boostorg/type_index.git
synced 2025-07-31 12:57:17 +02:00
Added two tests that attempt to mix rtti-on and rtti-off modules.
Those two tests must fail diring linking.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2012 Antony Polukhin
|
||||
# Copyright (C) 2012-2013 Antony Polukhin
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
@ -7,6 +7,7 @@
|
||||
import testing ;
|
||||
import feature ;
|
||||
|
||||
# Variable that contains all the stuff required for linking against -lboost_unit_test
|
||||
tlib = /boost/test//boost_unit_test_framework/<link>static ;
|
||||
|
||||
lib test_lib_rtti : test_lib.cpp : <link>shared ;
|
||||
@ -23,6 +24,17 @@ test-suite type_index
|
||||
[ run testing_crossmodule.cpp test_lib_rtti $(tlib) ]
|
||||
[ run testing_crossmodule.cpp test_lib_nortti $(tlib) : : : <rtti>off : testing_crossmodule_no_rtti ]
|
||||
|
||||
# Bjam has specific rule for not mixing <rtti>on and <rtti>off binaries, so we can not
|
||||
# just provide `test_lib_nortti` library for `<rtti>on` build. But here are some workarounds:
|
||||
[ link-fail testing_crossmodule.cpp $(tlib)
|
||||
: <linkflags>$(test_lib_nortti.location)/test_lib_nortti
|
||||
: link_fail_rtti_nortti
|
||||
]
|
||||
[ link-fail testing_crossmodule.cpp $(tlib)
|
||||
: <rtti>off <linkflags>$(test_lib_rtti.location)/test_lib_rtti
|
||||
: link_fail_nortti_rtti
|
||||
]
|
||||
|
||||
# Examples that must work even with RTTI disabled
|
||||
[ run ../examples/registry.cpp : : : <rtti>off : registry_no_rtti ]
|
||||
[ run ../examples/exact_types_match.cpp : : : <rtti>off : exact_types_match_no_rtti ]
|
||||
@ -35,3 +47,4 @@ for local p in [ glob ../examples/*.cpp ]
|
||||
{
|
||||
type_index += [ run $(p) ] ;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user