From e2c227d4aaade5e5069bab0abf2f2d4520619bcd Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Wed, 21 May 2014 10:47:30 +0400 Subject: [PATCH] Fix a typo and improve macro definitionas in Jamfile --- test/Jamfile.v2 | 20 +++++++++++--------- test/type_index_test.cpp | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 75f710c..9c96485 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -13,14 +13,16 @@ compat = BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY ; # Making own `nortti` that is link compatible. # We explicitly define BOOST_NO_RTTI because it sometimes can not be detected by build system. -nortti = gcc:"-fno-rtti -DBOOST_NO_RTTI" clang:"-fno-rtti -DBOOST_NO_RTTI" intel:"-fno-rtti -DBOOST_NO_RTTI" msvc:/GR- ; +nortti = gcc:"-fno-rtti -DBOOST_NO_RTTI" clang:"-fno-rtti -DBOOST_NO_RTTI -DBOOST_NO_TYPEID" intel:"-fno-rtti -DBOOST_NO_RTTI" msvc:/GR- ; + +norttidefines = gcc:"-DBOOST_NO_RTTI -DBOOST_NO_TYPEID" clang:"-DBOOST_NO_RTTI -DBOOST_NO_TYPEID" intel:"-DBOOST_NO_RTTI -DBOOST_NO_TYPEID" msvc:-DBOOST_NO_RTTI ; # Making libraries that CANNOT work between rtti-on/rtti-off modules -obj test_lib_nortti-obj : test_lib.cpp : shared off -DBOOST_NO_RTTI ; -obj test_lib_anonymous_nortti-obj : test_lib_anonymous.cpp : shared off -DBOOST_NO_RTTI ; -lib test_lib_nortti : test_lib_nortti-obj : shared off -DBOOST_NO_RTTI ; -lib test_lib_anonymous_nortti : test_lib_anonymous_nortti-obj : shared off -DBOOST_NO_RTTI ; +obj test_lib_nortti-obj : test_lib.cpp : shared off $(norttidefines) ; +obj test_lib_anonymous_nortti-obj : test_lib_anonymous.cpp : shared off $(norttidefines) ; +lib test_lib_nortti : test_lib_nortti-obj : shared off $(norttidefines) ; +lib test_lib_anonymous_nortti : test_lib_anonymous_nortti-obj : shared off $(norttidefines) ; obj test_lib_rtti-obj : test_lib.cpp : shared ; obj test_lib_anonymous_rtti-obj : test_lib_anonymous.cpp : shared ; @@ -37,12 +39,12 @@ lib test_lib_rtti_compat : test_lib_rtti_compat-obj : shared $(nortti) $(c test-suite type_index : [ run type_index_test.cpp ] - [ run type_index_test.cpp : : : off -DBOOST_NO_RTTI : type_index_test_no_rtti ] + [ run type_index_test.cpp : : : off $(norttidefines) : type_index_test_no_rtti ] [ run ctti_print_name.cpp : : : always_show_run_output ] [ run testing_crossmodule.cpp test_lib_rtti ] - [ run testing_crossmodule.cpp test_lib_nortti : : : off -DBOOST_NO_RTTI : testing_crossmodule_no_rtti ] + [ run testing_crossmodule.cpp test_lib_nortti : : : off $(norttidefines) : testing_crossmodule_no_rtti ] [ run testing_crossmodule_anonymous.cpp test_lib_anonymous_rtti ] - [ run testing_crossmodule_anonymous.cpp test_lib_anonymous_nortti : : : off -DBOOST_NO_RTTI : testing_crossmodule_anonymous_no_rtti ] + [ run testing_crossmodule_anonymous.cpp test_lib_anonymous_nortti : : : off $(norttidefines) : testing_crossmodule_anonymous_no_rtti ] [ compile-fail type_index_test_ctti_copy_fail.cpp ] [ compile-fail type_index_test_ctti_construct_fail.cpp ] [ compile type_index_test_ctti_alignment.cpp ] @@ -65,7 +67,7 @@ for local p in [ glob ../examples/*.cpp ] local target_name = $(p[1]:B)_no_rtti ; if $(target_name) != "table_of_names_no_rtti" { - type_index += [ run $(p) : : : off -DBOOST_NO_RTTI : $(target_name) ] ; + type_index += [ run $(p) : : : off $(norttidefines) : $(target_name) ] ; } } diff --git a/test/type_index_test.cpp b/test/type_index_test.cpp index 919f395..ab20c22 100644 --- a/test/type_index_test.cpp +++ b/test/type_index_test.cpp @@ -29,7 +29,7 @@ BOOST_AUTO_TEST_CASE(names_matches_type_id) BOOST_CHECK_EQUAL(type_id().pretty_name(), "int"); BOOST_CHECK_EQUAL(type_id().pretty_name(), "double"); - BOOST_CHECK_NE(type_id().name(), type_id().name()); + BOOST_CHECK_EQUAL(type_id().name(), type_id().name()); BOOST_CHECK_NE(type_id().name(), type_id().name()); BOOST_CHECK_NE(type_id().name(), type_id().name()); BOOST_CHECK_EQUAL(type_id().name(), type_id().name());