Compare commits

...

7 Commits

4 changed files with 80 additions and 17 deletions

View File

@ -196,35 +196,32 @@ local windows_pipeline(name, image, environment, arch = "amd64") =
),
linux_pipeline(
"Linux 20.04 Clang 13",
"cppalliance/droneubuntu2004:1",
"Linux 22.04 Clang 13",
"cppalliance/droneubuntu2204:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-13', CXXSTD: '03,11,14,17,20' },
"clang-13",
["deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main"],
),
linux_pipeline(
"Linux 20.04 Clang 14 UBSAN",
"cppalliance/droneubuntu2004:1",
"Linux 22.04 Clang 14 UBSAN",
"cppalliance/droneubuntu2204:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-14', CXXSTD: '03,11,14,17,20' } + ubsan,
"clang-14",
["deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main"],
),
linux_pipeline(
"Linux 20.04 Clang 14 ASAN",
"cppalliance/droneubuntu2004:1",
"Linux 22.04 Clang 14 ASAN",
"cppalliance/droneubuntu2204:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-14', CXXSTD: '03,11,14,17,20' } + asan,
"clang-14",
["deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main"],
),
linux_pipeline(
"Linux 20.04 Clang 15",
"cppalliance/droneubuntu2004:1",
"Linux 22.04 Clang 15",
"cppalliance/droneubuntu2204:1",
{ TOOLSET: 'clang', COMPILER: 'clang++-15', CXXSTD: '03,11,14,17,20,2b' },
"clang-15",
["deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main"],
["deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main"],
),
macos_pipeline(

View File

@ -19,6 +19,15 @@ target_link_libraries(boost_variant2
Boost::mp11
)
if(CMAKE_VERSION VERSION_GREATER 3.18 AND CMAKE_GENERATOR MATCHES "Visual Studio")
file(GLOB_RECURSE boost_variant2_IDEFILES CONFIGURE_DEPENDS include/*.hpp)
source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_variant2_IDEFILES} PREFIX "Header Files")
list(APPEND boost_variant2_IDEFILES extra/boost_variant2.natvis)
target_sources(boost_variant2 PRIVATE ${boost_variant2_IDEFILES})
endif()
target_compile_features(boost_variant2 INTERFACE cxx_std_11)
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")

View File

@ -30,14 +30,16 @@ environment:
TOOLSET: clang-win
ADDRMD: 64
CXXSTD: 14,17,latest
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
TOOLSET: msvc-14.2
ADDRMD: 32,64
CXXSTD: 14,17,latest
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
TOOLSET: clang-win
ADDRMD: 64
CXXSTD: 14,17,latest
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
CMAKE: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_SUBDIR: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_INSTALL: 1
install:
- set BOOST_BRANCH=develop
@ -57,4 +59,27 @@ test_script:
- if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD%
- if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD%
- if not "%CXXFLAGS%" == "" set CXXFLAGS=cxxflags=%CXXFLAGS%
- b2 -j3 libs/variant2/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% %CXXFLAGS% variant=debug,release embed-manifest-via=linker
- if "%CMAKE%%CMAKE_SUBDIR%%CMAKE_INSTALL%" == "" b2 -j3 libs/variant2/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% %CXXFLAGS% variant=debug,release embed-manifest-via=linker
- if not "%CMAKE%" == "" mkdir __build__ && cd __build__
- if not "%CMAKE%" == "" cmake -DBUILD_TESTING=ON -DBOOST_INCLUDE_LIBRARIES=variant2 -DBoost_VERBOSE=ON ..
- if not "%CMAKE%" == "" cmake --build . --target tests -j 3 --config Debug & ctest --output-on-failure --no-tests=error -j 3 -C Debug
- if not "%CMAKE%" == "" cmake --build . --target tests -j 3 --config Release & ctest --output-on-failure --no-tests=error -j 3 -C Release
- if not "%CMAKE%" == "" cmake --build . --target tests -j 3 --config MinSizeRel & ctest --output-on-failure --no-tests=error -j 3 -C MinSizeRel
- if not "%CMAKE%" == "" cmake --build . --target tests -j 3 --config RelWithDebInfo & ctest --output-on-failure --no-tests=error -j 3 -C RelWithDebInfo
- if not "%CMAKE_SUBDIR%" == "" cd libs/variant2/test/cmake_subdir_test && mkdir __build__ && cd __build__
- if not "%CMAKE_SUBDIR%" == "" cmake ..
- if not "%CMAKE_SUBDIR%" == "" cmake --build . --config Debug && cmake --build . --target check --config Debug
- if not "%CMAKE_SUBDIR%" == "" cmake --build . --config Release && cmake --build . --target check --config Release
- if not "%CMAKE_SUBDIR%" == "" cmake --build . --config MinSizeRel && cmake --build . --target check --config MinSizeRel
- if not "%CMAKE_SUBDIR%" == "" cmake --build . --config RelWithDebInfo && cmake --build . --target check --config RelWithDebInfo
- if not "%CMAKE_INSTALL%" == "" mkdir __build__ && cd __build__
- if not "%CMAKE_INSTALL%" == "" cmake -DBOOST_INCLUDE_LIBRARIES=variant2 -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix ..
- if not "%CMAKE_INSTALL%" == "" cmake --build . --target install --config Debug
- if not "%CMAKE_INSTALL%" == "" cmake --build . --target install --config Release
- if not "%CMAKE_INSTALL%" == "" cd ../libs/variant2/test/cmake_install_test && mkdir __build__ && cd __build__
- if not "%CMAKE_INSTALL%" == "" cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix ..
- if not "%CMAKE_INSTALL%" == "" cmake --build . --config Debug && cmake --build . --target check --config Debug
- if not "%CMAKE_INSTALL%" == "" cmake --build . --config Release && cmake --build . --target check --config Release

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="boost::variant2::detail::variant_ma_base_impl&lt;*&gt;" Inheritable="true">
<Intrinsic Name="index" Expression="$T2==1?((int)ix_-1):((int)((ix_-2)/2))"/>
<DisplayString Condition="index()==0&amp;&amp;$T2==1" Optional="true">{st_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==1&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==2&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==3&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==4&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==5&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==6&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==7&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==8&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==9&amp;&amp;$T2==1" Optional="true">{st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==0&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==1&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==2&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==3&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==4&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==5&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==6&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==7&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==8&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<DisplayString Condition="index()==9&amp;&amp;$T2==0" Optional="true">{st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()})</DisplayString>
<Expand>
<Item Name="[index]">index()</Item>
<Item Name="ix_">ix_</Item>
</Expand>
</Type>
</AutoVisualizer>