From a7684503459ebc1a10b1312a4a828b2ad3ed0ee6 Mon Sep 17 00:00:00 2001 From: Elliot <35050275+apache-hb@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:21:18 -0400 Subject: [PATCH] Add meson option for windows seh usage Adds a meson option to toggle usage of windows SEH handling. --- meson_options.txt | 2 ++ src/catch2/meson.build | 4 ++++ 2 files changed, 6 insertions(+) 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',