diff --git a/meson_options.txt b/meson_options.txt index 76904873..31dd506c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1 +1,3 @@ option('tests', type: 'boolean', value: true, description: 'Build the unit tests') + +option('windows_seh', type: 'boolean', value: true, description: 'Enable Windows SEH exception handling when available') diff --git a/src/catch2/meson.build b/src/catch2/meson.build index 5b2a047d..37565960 100644 --- a/src/catch2/meson.build +++ b/src/catch2/meson.build @@ -10,6 +10,10 @@ conf_data = configuration_data() conf_data.set('CATCH_CONFIG_DEFAULT_REPORTER', 'console') conf_data.set('CATCH_CONFIG_CONSOLE_WIDTH', '80') +windows_seh = get_option('windows_seh') +conf_data.set('CATCH_CONFIG_WINDOWS_SEH', windows_seh) +conf_data.set('CATCH_CONFIG_NO_WINDOWS_SEH', not windows_seh) + configure_file( input: 'catch_user_config.hpp.in', output: 'catch_user_config.hpp',