2020-01-04 14:21:38 +00:00
|
|
|
test_sources = [
|
|
|
|
'lifetimes.cpp',
|
|
|
|
'main.cpp',
|
|
|
|
'parsing_arrays.cpp',
|
|
|
|
'parsing_booleans.cpp',
|
|
|
|
'parsing_comments.cpp',
|
|
|
|
'parsing_dates_and_times.cpp',
|
|
|
|
'parsing_floats.cpp',
|
|
|
|
'parsing_integers.cpp',
|
|
|
|
'parsing_key_value_pairs.cpp',
|
|
|
|
'parsing_spec_example.cpp',
|
|
|
|
'parsing_strings.cpp',
|
|
|
|
'parsing_tables.cpp'
|
|
|
|
]
|
|
|
|
|
|
|
|
disable_exceptions = 'cpp_eh=none'
|
|
|
|
no_unreleased_features = '-DTOML_UNRELEASED_FEATURES=0'
|
2020-01-06 18:21:16 +00:00
|
|
|
define_toml_use_char8_strings = '-DTOML_CHAR_8_STRINGS=1'
|
|
|
|
manually_set_cpp_std = 'cpp_std=none'
|
|
|
|
cpp20 = '-std=c++2a'
|
2020-01-04 14:21:38 +00:00
|
|
|
|
2020-01-06 18:21:16 +00:00
|
|
|
char = executable(
|
|
|
|
'char',
|
2020-01-04 14:21:38 +00:00
|
|
|
test_sources,
|
|
|
|
include_directories : inc
|
|
|
|
)
|
2020-01-06 18:21:16 +00:00
|
|
|
test('char', char)
|
2020-01-04 14:21:38 +00:00
|
|
|
|
|
|
|
|
2020-01-06 18:21:16 +00:00
|
|
|
char_noexcept = executable(
|
|
|
|
'char_noexcept',
|
2020-01-04 14:21:38 +00:00
|
|
|
test_sources,
|
|
|
|
include_directories : inc,
|
|
|
|
override_options : [ disable_exceptions ]
|
|
|
|
)
|
2020-01-06 18:21:16 +00:00
|
|
|
test('char_noexcept', char_noexcept)
|
2020-01-04 14:21:38 +00:00
|
|
|
|
|
|
|
|
2020-01-06 18:21:16 +00:00
|
|
|
strict_char = executable(
|
|
|
|
'strict_char',
|
2020-01-04 14:21:38 +00:00
|
|
|
test_sources,
|
|
|
|
include_directories : inc,
|
|
|
|
cpp_args : [ no_unreleased_features ]
|
|
|
|
)
|
2020-01-06 18:21:16 +00:00
|
|
|
test('strict_char', strict_char)
|
2020-01-04 14:21:38 +00:00
|
|
|
|
|
|
|
|
2020-01-06 18:21:16 +00:00
|
|
|
strict_char_noexcept = executable(
|
|
|
|
'strict_char_noexcept',
|
2020-01-04 14:21:38 +00:00
|
|
|
test_sources,
|
|
|
|
include_directories : inc,
|
|
|
|
override_options : [ disable_exceptions ],
|
|
|
|
cpp_args : [ no_unreleased_features ]
|
|
|
|
)
|
2020-01-06 18:21:16 +00:00
|
|
|
test('strict_char_noexcept', strict_char_noexcept)
|
|
|
|
|
2020-01-04 14:21:38 +00:00
|
|
|
|
2020-01-06 18:21:16 +00:00
|
|
|
if compiler_supports_char8_strings
|
2020-01-04 14:21:38 +00:00
|
|
|
|
2020-01-06 18:21:16 +00:00
|
|
|
char8 = executable(
|
|
|
|
'char8',
|
|
|
|
test_sources,
|
|
|
|
include_directories : inc,
|
|
|
|
override_options : [ manually_set_cpp_std ],
|
|
|
|
cpp_args : [ cpp20, define_toml_use_char8_strings ]
|
|
|
|
)
|
|
|
|
test('char8', char8)
|
2020-01-04 14:21:38 +00:00
|
|
|
|
2020-01-06 18:21:16 +00:00
|
|
|
char8_noexcept = executable(
|
|
|
|
'char8_noexcept',
|
|
|
|
test_sources,
|
|
|
|
include_directories : inc,
|
|
|
|
override_options : [ manually_set_cpp_std, disable_exceptions ],
|
|
|
|
cpp_args : [ cpp20, define_toml_use_char8_strings ]
|
|
|
|
)
|
|
|
|
test('char8_noexcept', char8_noexcept)
|
|
|
|
|
|
|
|
strict_char8 = executable(
|
|
|
|
'strict_char8',
|
|
|
|
test_sources,
|
|
|
|
include_directories : inc,
|
|
|
|
override_options : [ manually_set_cpp_std ],
|
|
|
|
cpp_args : [ cpp20, define_toml_use_char8_strings, no_unreleased_features ]
|
|
|
|
)
|
|
|
|
test('strict_char8', strict_char8)
|
2020-01-04 14:21:38 +00:00
|
|
|
|
2020-01-06 18:21:16 +00:00
|
|
|
strict_char8_noexcept = executable(
|
|
|
|
'strict_char8_noexcept',
|
|
|
|
test_sources,
|
|
|
|
include_directories : inc,
|
|
|
|
override_options : [ manually_set_cpp_std, disable_exceptions ],
|
|
|
|
cpp_args : [ cpp20, define_toml_use_char8_strings, no_unreleased_features ]
|
|
|
|
)
|
|
|
|
test('strict_char8_noexcept', strict_char8_noexcept)
|
2020-01-04 14:21:38 +00:00
|
|
|
|
2020-01-06 18:21:16 +00:00
|
|
|
endif
|