mkdocs: add CMake option hints to macros
This commit is contained in:
parent
be091f65c2
commit
842e76ceb7
@ -11,9 +11,6 @@ When enabled, exception messages contain a [JSON Pointer](../json_pointer/json_p
|
|||||||
triggered the exception. Note that enabling this macro increases the size of every JSON value by one pointer and adds
|
triggered the exception. Note that enabling this macro increases the size of every JSON value by one pointer and adds
|
||||||
some runtime overhead.
|
some runtime overhead.
|
||||||
|
|
||||||
The diagnostics messages can also be controlled with the CMake option `JSON_Diagnostics` (`OFF` by default) which sets
|
|
||||||
`JSON_DIAGNOSTICS` accordingly.
|
|
||||||
|
|
||||||
## Default definition
|
## Default definition
|
||||||
|
|
||||||
The default value is `0` (extended diagnostics are switched off).
|
The default value is `0` (extended diagnostics are switched off).
|
||||||
@ -37,6 +34,12 @@ When the macro is not defined, the library will define it to its default value.
|
|||||||
|
|
||||||
Where possible, it is still recommended that all code define this the same way for maximum interoperability.
|
Where possible, it is still recommended that all code define this the same way for maximum interoperability.
|
||||||
|
|
||||||
|
!!! hint "CMake option"
|
||||||
|
|
||||||
|
Diagnostic messages can also be controlled with the CMake option
|
||||||
|
[`JSON_Diagnostics`](../../integration/cmake.md#json_diagnostics) (`OFF` by default)
|
||||||
|
which defines `JSON_DIAGNOSTICS` accordingly.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
??? example "Example 1: default behavior"
|
??? example "Example 1: default behavior"
|
||||||
|
|||||||
@ -19,6 +19,14 @@ By default, `#!cpp JSON_DISABLE_ENUM_SERIALIZATION` is not defined.
|
|||||||
#undef JSON_DISABLE_ENUM_SERIALIZATION
|
#undef JSON_DISABLE_ENUM_SERIALIZATION
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
!!! hint "CMake option"
|
||||||
|
|
||||||
|
Enum serialization can also be controlled with the CMake option
|
||||||
|
[`JSON_DisableEnumSerialization`](../../integration/cmake.md#json_disableenumserialization)
|
||||||
|
(`OFF` by default) which defines `JSON_DISABLE_ENUM_SERIALIZATION` accordingly.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
??? example "Example 1: Disabled behavior"
|
??? example "Example 1: Disabled behavior"
|
||||||
|
|||||||
@ -7,9 +7,6 @@
|
|||||||
When defined to `0`, implicit conversions are switched off. By default, implicit conversions are switched on. The
|
When defined to `0`, implicit conversions are switched off. By default, implicit conversions are switched on. The
|
||||||
value directly affects [`operator ValueType`](../basic_json/operator_ValueType.md).
|
value directly affects [`operator ValueType`](../basic_json/operator_ValueType.md).
|
||||||
|
|
||||||
Implicit conversions can also be controlled with the CMake option `JSON_ImplicitConversions` (`ON` by default) which
|
|
||||||
sets `JSON_USE_IMPLICIT_CONVERSIONS` accordingly.
|
|
||||||
|
|
||||||
## Default definition
|
## Default definition
|
||||||
|
|
||||||
By default, implicit conversions are enabled.
|
By default, implicit conversions are enabled.
|
||||||
@ -27,6 +24,12 @@ By default, implicit conversions are enabled.
|
|||||||
You can prepare existing code by already defining `JSON_USE_IMPLICIT_CONVERSIONS` to `0` and replace any implicit
|
You can prepare existing code by already defining `JSON_USE_IMPLICIT_CONVERSIONS` to `0` and replace any implicit
|
||||||
conversions with calls to [`get`](../basic_json/get.md).
|
conversions with calls to [`get`](../basic_json/get.md).
|
||||||
|
|
||||||
|
!!! hint "CMake option"
|
||||||
|
|
||||||
|
Implicit conversions can also be controlled with the CMake option
|
||||||
|
[`JSON_ImplicitConversions`](../../integration/cmake.md#json_legacydiscardedvaluecomparison)
|
||||||
|
(`ON` by default) which defines `JSON_USE_IMPLICIT_CONVERSIONS` accordingly.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
??? example
|
??? example
|
||||||
|
|||||||
@ -56,6 +56,12 @@ When the macro is not defined, the library will define it to its default value.
|
|||||||
New code should not depend on it and existing code should try to remove or rewrite
|
New code should not depend on it and existing code should try to remove or rewrite
|
||||||
expressions relying on it.
|
expressions relying on it.
|
||||||
|
|
||||||
|
!!! hint "CMake option"
|
||||||
|
|
||||||
|
Legacy comparison can also be controlled with the CMake option
|
||||||
|
[`JSON_LegacyDiscardedValueComparison`](../../integration/cmake.md#json_legacydiscardedvaluecomparison)
|
||||||
|
(`OFF` by default) which defines `JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON` accordingly.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
??? example
|
??? example
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user