@@ -23,16 +23,17 @@ OPTION (MSGPACK_CXX14 "Using c++14 compiler" OFF)
2323OPTION (MSGPACK_CXX17 "Using c++17 compiler" OFF )
2424OPTION (MSGPACK_CXX20 "Using c++20 compiler" OFF )
2525
26- OPTION (MSGPACK_32BIT "32bit compile" OFF )
27- OPTION (MSGPACK_USE_BOOST "Use Boost libraried" ON )
28- OPTION (MSGPACK_USE_X3_PARSE "Use Boost X3 parse" OFF )
29- OPTION (MSGPACK_BUILD_TESTS "Build tests" OFF )
30- OPTION (MSGPACK_BUILD_DOCS "Build Doxygen documentation" ON )
31- OPTION (MSGPACK_FUZZ_REGRESSION "Enable regression testing" OFF )
32- OPTION (MSGPACK_BUILD_EXAMPLES "Build msgpack examples" OFF )
33- OPTION (MSGPACK_GEN_COVERAGE "Generate coverage report" OFF )
34- OPTION (MSGPACK_USE_STATIC_BOOST "Statically link with boost libraries" OFF )
35- OPTION (MSGPACK_CHAR_SIGN "Char sign to use (signed or unsigned)" )
26+ OPTION (MSGPACK_32BIT "32bit compile" OFF )
27+ OPTION (MSGPACK_USE_BOOST "Use Boost libraried" ON )
28+ OPTION (MSGPACK_USE_X3_PARSE "Use Boost X3 parse" OFF )
29+ OPTION (MSGPACK_BUILD_TESTS "Build tests" OFF )
30+ OPTION (MSGPACK_BUILD_DOCS "Build Doxygen documentation" ON )
31+ OPTION (MSGPACK_FUZZ_REGRESSION "Enable regression testing" OFF )
32+ OPTION (MSGPACK_BUILD_EXAMPLES "Build msgpack examples" OFF )
33+ OPTION (MSGPACK_GEN_COVERAGE "Generate coverage report" OFF )
34+ OPTION (MSGPACK_USE_STATIC_BOOST "Statically link with boost libraries" OFF )
35+ OPTION (MSGPACK_CHAR_SIGN "Char sign to use (signed or unsigned)" )
36+ OPTION (MSGPACK_USE_STD_VARIANT_ADAPTOR "Enable the adaptor for std::variant" OFF )
3637
3738SET (CMAKE_CXX_STANDARD_REQUIRED ON )
3839
@@ -92,6 +93,10 @@ ELSE ()
9293 TARGET_COMPILE_DEFINITIONS (msgpack-cxx INTERFACE MSGPACK_DEFAULT_API_VERSION=3)
9394ENDIF ()
9495
96+ IF (MSGPACK_USE_STD_VARIANT_ADAPTOR)
97+ TARGET_COMPILE_DEFINITIONS (msgpack-cxx INTERFACE MSGPACK_USE_STD_VARIANT_ADAPTOR)
98+ ENDIF ()
99+
95100IF ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
96101 IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.1)
97102 INCLUDE (CheckCXXSourceCompiles)
0 commit comments