Skip to content

Commit 818d87c

Browse files
committed
add option in CMake
1 parent 327f3d1 commit 818d87c

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

CMakeLists.txt

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ OPTION (MSGPACK_CXX14 "Using c++14 compiler" OFF)
2323
OPTION (MSGPACK_CXX17 "Using c++17 compiler" OFF)
2424
OPTION (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

3738
SET (CMAKE_CXX_STANDARD_REQUIRED ON)
3839

@@ -92,6 +93,10 @@ ELSE ()
9293
TARGET_COMPILE_DEFINITIONS(msgpack-cxx INTERFACE MSGPACK_DEFAULT_API_VERSION=3)
9394
ENDIF ()
9495

96+
IF (MSGPACK_USE_STD_VARIANT_ADAPTOR)
97+
TARGET_COMPILE_DEFINITIONS(msgpack-cxx INTERFACE MSGPACK_USE_STD_VARIANT_ADAPTOR)
98+
ENDIF ()
99+
95100
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
96101
IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.1)
97102
INCLUDE (CheckCXXSourceCompiles)

0 commit comments

Comments
 (0)