mirror of
https://github.com/nlohmann/json.git
synced 2026-10-05 22:20:30 +00:00
meson: add support for the GlobalUDLs option
Signed-off-by: Dylan Baker <dylan@pnwbakers.com>
This commit is contained in:
@@ -12,7 +12,13 @@ else
|
|||||||
incdir = 'single_include'
|
incdir = 'single_include'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
cpp_args = [
|
||||||
|
'-DJSON_USE_GLOBAL_UDLS=@0@'.format(
|
||||||
|
(not get_option('GlobalUDLs')).to_int()),
|
||||||
|
]
|
||||||
|
|
||||||
nlohmann_json_dep = declare_dependency(
|
nlohmann_json_dep = declare_dependency(
|
||||||
|
compile_args: cpp_args,
|
||||||
include_directories: include_directories(incdir)
|
include_directories: include_directories(incdir)
|
||||||
)
|
)
|
||||||
meson.override_dependency('nlohmann_json', nlohmann_json_dep)
|
meson.override_dependency('nlohmann_json', nlohmann_json_dep)
|
||||||
|
|||||||
@@ -4,3 +4,9 @@ option(
|
|||||||
value: true,
|
value: true,
|
||||||
description: 'Use non-amalgamated version of the library',
|
description: 'Use non-amalgamated version of the library',
|
||||||
)
|
)
|
||||||
|
option(
|
||||||
|
'GlobalUDLs',
|
||||||
|
type: 'boolean',
|
||||||
|
value: true,
|
||||||
|
description: 'Place user-defined string literals in the global namespace',
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user