diff --git a/libs/type_index/test/Jamfile.v2 b/libs/type_index/test/Jamfile.v2 index 22f7686..0d30998 100644 --- a/libs/type_index/test/Jamfile.v2 +++ b/libs/type_index/test/Jamfile.v2 @@ -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/static ; lib test_lib_rtti : test_lib.cpp : 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) : : : off : testing_crossmodule_no_rtti ] + # Bjam has specific rule for not mixing on and off binaries, so we can not + # just provide `test_lib_nortti` library for `on` build. But here are some workarounds: + [ link-fail testing_crossmodule.cpp $(tlib) + : $(test_lib_nortti.location)/test_lib_nortti + : link_fail_rtti_nortti + ] + [ link-fail testing_crossmodule.cpp $(tlib) + : off $(test_lib_rtti.location)/test_lib_rtti + : link_fail_nortti_rtti + ] + # Examples that must work even with RTTI disabled [ run ../examples/registry.cpp : : : off : registry_no_rtti ] [ run ../examples/exact_types_match.cpp : : : off : exact_types_match_no_rtti ] @@ -35,3 +47,4 @@ for local p in [ glob ../examples/*.cpp ] { type_index += [ run $(p) ] ; } +