diff --git a/CMakeLists.txt b/CMakeLists.txt index 3826577..ec44983 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,13 @@ target_link_libraries(boost_variant2 Boost::mp11 ) +file(GLOB_RECURSE boost_variant2_IDEFILES CONFIGURE_DEPENDS include/*.hpp) +source_group(TREE ${PROJECT_SOURCE_DIR}/include FILES ${boost_variant2_IDEFILES}) +if (CMAKE_GENERATOR MATCHES "Visual Studio") + list(APPEND boost_variant2_IDEFILES extra/boost_variant2.natvis) +endif() +target_sources(boost_variant2 PRIVATE ${boost_variant2_IDEFILES}) + target_compile_features(boost_variant2 INTERFACE cxx_std_11) if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt") diff --git a/extra/boost_variant2.natvis b/extra/boost_variant2.natvis new file mode 100644 index 0000000..8f8cab4 --- /dev/null +++ b/extra/boost_variant2.natvis @@ -0,0 +1,32 @@ + + + + + + {st_.rest_.first_} ({index()}) + {st_.rest_.rest_.first_} ({index()}) + {st_.rest_.rest_.rest_.first_} ({index()}) + {st_.rest_.rest_.rest_.rest_.first_} ({index()}) + {st_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) + {st_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) + {st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) + {st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) + {st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) + {st_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) + {st_[ix_%2].rest_.first_} ({index()}) + {st_[ix_%2].rest_.rest_.first_} ({index()}) + {st_[ix_%2].rest_.rest_.rest_.first_} ({index()}) + {st_[ix_%2].rest_.rest_.rest_.rest_.first_} ({index()}) + {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.first_} ({index()}) + {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) + {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) + {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) + {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) + {st_[ix_%2].rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.rest_.first_} ({index()}) + + index() + ix_ + + + +