Skip to content

Commit 482f07f

Browse files
committed
Fix RTTI flag in CMake tests
1 parent b0701b4 commit 482f07f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ set(BOOST_TEST_LINK_LIBRARIES Boost::type_index Boost::core)
4949
boost_test(TYPE run SOURCES type_index_test.cpp)
5050
boost_test(TYPE run SOURCES type_index_runtime_cast_test.cpp LINK_LIBRARIES Boost::smart_ptr)
5151
boost_test(TYPE run SOURCES type_index_constexpr_test.cpp)
52-
boost_test(TYPE run SOURCES type_index_test.cpp COMPILE_OPTIONS -fno-rtti NAME type_index_test_no_rtti)
52+
boost_test(TYPE run SOURCES type_index_test.cpp COMPILE_OPTIONS BOOST_TYPEINDEX_DETAIL_NO_RTTI NAME type_index_test_no_rtti)
5353
boost_test(TYPE run SOURCES ctti_print_name.cpp)
5454

5555
boost_test(TYPE run SOURCES testing_crossmodule.cpp LINK_LIBRARIES boost_type_index_test_lib_rtti)
56-
boost_test(TYPE run SOURCES testing_crossmodule.cpp LINK_LIBRARIES boost_type_index_test_lib_nortti COMPILE_OPTIONS -fno-rtti NAME testing_crossmodule_no_rtti)
56+
boost_test(TYPE run SOURCES testing_crossmodule.cpp LINK_LIBRARIES boost_type_index_test_lib_nortti COMPILE_OPTIONS BOOST_TYPEINDEX_DETAIL_NO_RTTI NAME testing_crossmodule_no_rtti)
5757
boost_test(TYPE run SOURCES testing_crossmodule_anonymous.cpp LINK_LIBRARIES boost_type_index_test_lib_anonymous_rtti)
5858

5959
boost_test(TYPE run SOURCES compare_ctti_stl.cpp)
@@ -64,10 +64,10 @@ boost_test(TYPE compile-fail SOURCES type_index_test_ctti_construct_fail.cpp)
6464
boost_test(TYPE compile SOURCES type_index_test_ctti_alignment.cpp)
6565

6666
# Mixing RTTI on and off
67-
boost_test(TYPE link-fail SOURCES testing_crossmodule.cpp LINK_LIBRARIES boost_type_index_test_lib_rtti COMPILE_OPTIONS -fno-rtti NAME link_fail_nortti_rtti)
67+
boost_test(TYPE link-fail SOURCES testing_crossmodule.cpp LINK_LIBRARIES boost_type_index_test_lib_rtti COMPILE_OPTIONS BOOST_TYPEINDEX_DETAIL_NO_RTTI NAME link_fail_nortti_rtti)
6868
boost_test(TYPE link-fail SOURCES testing_crossmodule.cpp LINK_LIBRARIES boost_type_index_test_lib_nortti NAME link_fail_rtti_nortti)
6969

70-
boost_test(TYPE run SOURCES testing_crossmodule.cpp LINK_LIBRARIES boost_type_index_test_lib_rtti_compat COMPILE_OPTIONS -fno-rtti NAME testing_crossmodule_nortti_rtti_compat)
70+
boost_test(TYPE run SOURCES testing_crossmodule.cpp LINK_LIBRARIES boost_type_index_test_lib_rtti_compat COMPILE_OPTIONS BOOST_TYPEINDEX_DETAIL_NO_RTTI NAME testing_crossmodule_nortti_rtti_compat)
7171
boost_test(TYPE run SOURCES testing_crossmodule.cpp LINK_LIBRARIES boost_type_index_test_lib_nortti_compat NAME testing_crossmodule_rtti_nortti_compat)
7272

7373
file(GLOB EXAMPLE_FILES "../examples/*.cpp")
@@ -76,6 +76,6 @@ foreach (testsourcefile ${EXAMPLE_FILES})
7676

7777
get_filename_component(testname ${testsourcefile} NAME_WE)
7878
if(NOT testname STREQUAL "table_of_names")
79-
boost_test(TYPE run SOURCES ${testsourcefile} NAME ${testname}_no_rtti COMPILE_OPTIONS -fno-rtti INCLUDE_DIRECTORIES ../examples LINK_LIBRARIES Boost::unordered)
79+
boost_test(TYPE run SOURCES ${testsourcefile} NAME ${testname}_no_rtti COMPILE_OPTIONS BOOST_TYPEINDEX_DETAIL_NO_RTTI INCLUDE_DIRECTORIES ../examples LINK_LIBRARIES Boost::unordered)
8080
endif()
8181
endforeach()

0 commit comments

Comments
 (0)