mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-25 01:19:07 +02:00
add option in CMake
This commit is contained in:
parent
327f3d1ad0
commit
818d87c9cb
@ -33,6 +33,7 @@ OPTION (MSGPACK_BUILD_EXAMPLES "Build msgpack examples" OFF)
|
||||
OPTION (MSGPACK_GEN_COVERAGE "Generate coverage report" OFF)
|
||||
OPTION (MSGPACK_USE_STATIC_BOOST "Statically link with boost libraries" OFF)
|
||||
OPTION (MSGPACK_CHAR_SIGN "Char sign to use (signed or unsigned)")
|
||||
OPTION (MSGPACK_USE_STD_VARIANT_ADAPTOR "Enable the adaptor for std::variant" OFF)
|
||||
|
||||
SET (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
@ -92,6 +93,10 @@ ELSE ()
|
||||
TARGET_COMPILE_DEFINITIONS(msgpack-cxx INTERFACE MSGPACK_DEFAULT_API_VERSION=3)
|
||||
ENDIF ()
|
||||
|
||||
IF (MSGPACK_USE_STD_VARIANT_ADAPTOR)
|
||||
TARGET_COMPILE_DEFINITIONS(msgpack-cxx INTERFACE MSGPACK_USE_STD_VARIANT_ADAPTOR)
|
||||
ENDIF ()
|
||||
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.1)
|
||||
INCLUDE (CheckCXXSourceCompiles)
|
||||
|
Loading…
x
Reference in New Issue
Block a user