From 9a4016d37accbba852117e66790ad2144ad27210 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 5 Oct 2015 21:35:15 +0300 Subject: [PATCH] Added option for VS exception type. --- compilers.py | 18 +++++++++++++++++- test cases/frameworks/1 boost/meson.build | 4 ---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/compilers.py b/compilers.py index 7a4394e62..10579eada 100644 --- a/compilers.py +++ b/compilers.py @@ -1023,6 +1023,22 @@ class VisualStudioCPPCompiler(VisualStudioCCompiler): if pe.returncode != 0: raise EnvironmentException('Executables created by C++ compiler %s are not runnable.' % self.name_string()) + def get_options(self): + return {'cpp_eh' : mesonlib.UserComboOption('cpp_eh', + 'C++ exception handling type.', + ['none', 'a', 's', 'sc'], + 'sc')} + + def get_option_compile_args(self, options): + args = [] + std = options['cpp_eh'] + if std.value != 'none': + args.append('/EH' + std.value) + return args + + def get_option_link_args(self, options): + return [] + GCC_STANDARD = 0 GCC_OSX = 1 GCC_MINGW = 2 @@ -1259,7 +1275,7 @@ class ClangCPPCompiler(CPPCompiler): return ['-include-pch', os.path.join (pch_dir, self.get_pch_name (header))] def get_options(self): - return {'c_std' : mesonlib.UserComboOption('cpp_std', 'C++ language standard to use', + return {'cpp_std' : mesonlib.UserComboOption('cpp_std', 'C++ language standard to use', ['none', 'c++03', 'c++11', 'c++1y'], 'c++11')} diff --git a/test cases/frameworks/1 boost/meson.build b/test cases/frameworks/1 boost/meson.build index afdfe0f9b..454c161af 100644 --- a/test cases/frameworks/1 boost/meson.build +++ b/test cases/frameworks/1 boost/meson.build @@ -1,9 +1,5 @@ project('boosttest', 'cpp') -if meson.get_compiler('cpp').get_id() == 'msvc' - add_global_arguments('/EHsc', language : 'cpp') -endif - # We want to have multiple separate configurations of Boost # within one project. The need to be independent of each other. # Use one without a library dependency and one with it.