Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 13 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
cd ..
rm -rf __build

- name: Run modules tests wihtout 'import std;'
- name: Run modules tests without 'import std;'
if: ${{matrix.toolset == 'clang-19'}}
run: |
cd ../boost-root/libs/type_index
Expand Down Expand Up @@ -213,46 +213,37 @@ jobs:
if: ${{matrix.toolset == 'msvc-14.3'}}
shell: cmd
run: |
choco install --no-progress ninja
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64
cd ../boost-root/
mkdir __build
cd __build
cmake -DBUILD_TESTING=1 -DBOOST_INCLUDE_LIBRARIES=type_index ..
cd ../boost-root
mkdir __build_cmake
cd __build_cmake
cmake -DBUILD_TESTING=1 -DBOOST_INCLUDE_LIBRARIES=type_index -G Ninja ..
cmake --build . --target tests --config Debug
ctest --output-on-failure --no-tests=error -C Debug
cd ..
rm -rf __build

- name: Run modules tests
if: ${{matrix.toolset == 'msvc-14.3'}}
shell: cmd
run: |
choco install --no-progress ninja
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64
cd ../boost-root/libs/type_index
mkdir build_module
cd build_module
cmake -DBOOST_USE_MODULES=1 -DBUILD_TESTING=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja ../test/cmake_subdir_test/
cd ../boost-root
mkdir __build_modules
cd __build_modules
cmake -DBOOST_USE_MODULES=1 -DBUILD_TESTING=1 -DCMAKE_CXX_STANDARD=23 -DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508 -G Ninja ../libs/type_index/test/cmake_subdir_test
cmake --build .
ctest --no-tests=error -V
cd ..
rm -rf build_module

- name: Run modules tests without 'import std;'
if: ${{matrix.toolset == 'msvc-14.3'}}
shell: cmd
run: |
choco install --no-progress ninja
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvarsall.bat" x64
cd ../boost-root/libs/type_index
mkdir build_module
cd build_module
cmake -DBOOST_USE_MODULES=1 -DBUILD_TESTING=1 -DCMAKE_CXX_STANDARD=20 -G Ninja ../test/cmake_subdir_test/
cd ../boost-root
mkdir __build_modules_std
cd __build_modules_std
cmake -DBOOST_USE_MODULES=1 -DBUILD_TESTING=1 -DCMAKE_CXX_STANDARD=20 -G Ninja ../libs/type_index/test/cmake_subdir_test
cmake --build .
ctest --no-tests=error -V
cd ..
rm -rf build_module

- name: Run tests
shell: cmd
Expand Down
10 changes: 5 additions & 5 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ set(BOOST_TEST_LINK_LIBRARIES Boost::type_index Boost::core)
boost_test(TYPE run SOURCES type_index_test.cpp)
boost_test(TYPE run SOURCES type_index_runtime_cast_test.cpp LINK_LIBRARIES Boost::smart_ptr)
boost_test(TYPE run SOURCES type_index_constexpr_test.cpp)
boost_test(TYPE run SOURCES type_index_test.cpp COMPILE_OPTIONS -fno-rtti NAME type_index_test_no_rtti)
boost_test(TYPE run SOURCES type_index_test.cpp COMPILE_OPTIONS ${BOOST_TYPEINDEX_DETAIL_NO_RTTI} NAME type_index_test_no_rtti)
boost_test(TYPE run SOURCES ctti_print_name.cpp)

boost_test(TYPE run SOURCES testing_crossmodule.cpp LINK_LIBRARIES boost_type_index_test_lib_rtti)
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)
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)
boost_test(TYPE run SOURCES testing_crossmodule_anonymous.cpp LINK_LIBRARIES boost_type_index_test_lib_anonymous_rtti)

boost_test(TYPE run SOURCES compare_ctti_stl.cpp)
Expand All @@ -64,10 +64,10 @@ boost_test(TYPE compile-fail SOURCES type_index_test_ctti_construct_fail.cpp)
boost_test(TYPE compile SOURCES type_index_test_ctti_alignment.cpp)

# Mixing RTTI on and off
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)
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)
boost_test(TYPE link-fail SOURCES testing_crossmodule.cpp LINK_LIBRARIES boost_type_index_test_lib_nortti NAME link_fail_rtti_nortti)

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)
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)
boost_test(TYPE run SOURCES testing_crossmodule.cpp LINK_LIBRARIES boost_type_index_test_lib_nortti_compat NAME testing_crossmodule_rtti_nortti_compat)

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

get_filename_component(testname ${testsourcefile} NAME_WE)
if(NOT testname STREQUAL "table_of_names")
boost_test(TYPE run SOURCES ${testsourcefile} NAME ${testname}_no_rtti COMPILE_OPTIONS -fno-rtti INCLUDE_DIRECTORIES ../examples LINK_LIBRARIES Boost::unordered)
boost_test(TYPE run SOURCES ${testsourcefile} NAME ${testname}_no_rtti COMPILE_OPTIONS ${BOOST_TYPEINDEX_DETAIL_NO_RTTI} INCLUDE_DIRECTORIES ../examples LINK_LIBRARIES Boost::unordered)
endif()
endforeach()
29 changes: 14 additions & 15 deletions test/cmake_subdir_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@ cmake_minimum_required(VERSION 3.5...4.0)

project(type_index_subdir_test LANGUAGES CXX)

add_subdirectory(../../../assert boostorg/assert)
add_subdirectory(../../../core boostorg/core)
add_subdirectory(../../../config boostorg/config)
add_subdirectory(../../../container_hash boostorg/container_hash)
add_subdirectory(../../../describe boostorg/describe)
add_subdirectory(../../../detail boostorg/detail)
add_subdirectory(../../../integer boostorg/integer)
add_subdirectory(../../../move boostorg/move)
add_subdirectory(../../../mp11 boostorg/mp11)
add_subdirectory(../../../preprocessor boostorg/preprocessor)
add_subdirectory(../../../smart_ptr boostorg/smart_ptr)
add_subdirectory(../../../static_assert boostorg/static_assert)
add_subdirectory(../../../throw_exception boostorg/throw_exception)
add_subdirectory(../../../type_traits boostorg/type_traits)

foreach(dep IN ITEMS
assert
config
core
container_hash
describe
mp11
smart_ptr
static_assert
throw_exception
unordered
predef)
add_subdirectory(../../../${dep} boostorg/${dep})
endforeach()
add_subdirectory(../../ boostorg/type_index)

enable_testing()
Expand Down
Loading