From 27170475bd5a33c1c18ba0c7f15a4124f1f8af0a Mon Sep 17 00:00:00 2001 From: apolukhin Date: Thu, 10 Oct 2013 18:30:10 +0400 Subject: [PATCH] Disable RTTI in Jamfile in a clever way Disable RTTI in Jamfile and assert that no-rtti tests are really run with RTTI disabled --- libs/type_index/test/Jamfile.v2 | 20 ++----------------- libs/type_index/test/testing_both_no_rtti.cpp | 4 ++++ .../test/testing_minimal_no_rtti.cpp | 4 ++++ 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/libs/type_index/test/Jamfile.v2 b/libs/type_index/test/Jamfile.v2 index 11462ab..79dc426 100644 --- a/libs/type_index/test/Jamfile.v2 +++ b/libs/type_index/test/Jamfile.v2 @@ -18,24 +18,8 @@ test-suite type_index [ run type_index_test.cpp ] [ run template_index_test.cpp ] [ run testing_both.cpp ] - [ run testing_both_no_rtti.cpp : : : BOOST_NO_RTTI - gcc-4.3:-fno-rtti - gcc-4.4:-fno-rtti - gcc-4.5:-fno-rtti - gcc-4.6:-fno-rtti - gcc-4.7:-fno-rtti - gcc-4.8:-fno-rtti - clang:-fno-rtti - ] + [ run testing_both_no_rtti.cpp : : : off ] [ run testing_minimal.cpp ] - [ run testing_minimal_no_rtti.cpp : : : BOOST_NO_RTTI - gcc-4.3:-fno-rtti - gcc-4.4:-fno-rtti - gcc-4.5:-fno-rtti - gcc-4.6:-fno-rtti - gcc-4.7:-fno-rtti - gcc-4.8:-fno-rtti - clang:-fno-rtti - ] + [ run testing_minimal_no_rtti.cpp : : : off ] ; diff --git a/libs/type_index/test/testing_both_no_rtti.cpp b/libs/type_index/test/testing_both_no_rtti.cpp index 783f611..4690316 100644 --- a/libs/type_index/test/testing_both_no_rtti.cpp +++ b/libs/type_index/test/testing_both_no_rtti.cpp @@ -9,6 +9,10 @@ #include #include +#ifndef BOOST_NO_RTTI +#error "This test must be run with disabled RTTI" +#endif + namespace my_namespace1 { class my_class{}; } diff --git a/libs/type_index/test/testing_minimal_no_rtti.cpp b/libs/type_index/test/testing_minimal_no_rtti.cpp index 1581487..8f154b2 100644 --- a/libs/type_index/test/testing_minimal_no_rtti.cpp +++ b/libs/type_index/test/testing_minimal_no_rtti.cpp @@ -9,6 +9,10 @@ #include #include +#ifndef BOOST_NO_RTTI +#error "This test must be run with disabled RTTI" +#endif + namespace my_namespace1 { class my_class{}; }