Enable b_ndebug on VisualStudioCCompiler

pull/3196/merge
Aleksey Filippov 7 years ago committed by Jussi Pakkanen
parent 3b9f4098ef
commit 8b1e9a6f6a
  1. 2
      mesonbuild/backend/vs2010backend.py
  2. 2
      mesonbuild/compilers/c.py
  3. 4
      test cases/common/185 ndebug if-release enabled/meson.build
  4. 4
      test cases/common/186 ndebug if-release disabled/meson.build
  5. 4
      test cases/unit/25 ndebug if-release/meson.build

@ -731,7 +731,7 @@ class Vs2010Backend(backends.Backend):
# generate_single_compile() and generate_basic_compiler_args()
for l, comp in target.compilers.items():
if l in file_args:
file_args[l] += compilers.get_base_compile_args(self.environment.coredata.base_options, comp)
file_args[l] += compilers.get_base_compile_args(self.get_base_options_for_target(target), comp)
file_args[l] += comp.get_option_compile_args(self.environment.coredata.compiler_options)
# Add compile args added using add_project_arguments()
for l, args in self.build.projects_args.get(target.subproject, {}).items():

@ -936,7 +936,7 @@ class VisualStudioCCompiler(CCompiler):
self.warn_args = {'1': ['/W2'],
'2': ['/W3'],
'3': ['/W4']}
self.base_options = ['b_pch'] # FIXME add lto, pgo and the like
self.base_options = ['b_pch', 'b_ndebug'] # FIXME add lto, pgo and the like
self.is_64 = is_64
# Override CCompiler.get_always_args

@ -4,8 +4,4 @@ project('ndebug enabled', 'c',
'b_ndebug=if-release',
])
if meson.get_compiler('c').get_id() == 'msvc'
error('MESON_SKIP_TEST b_ndebug is not supported on Visual Studio')
endif
test('exe', executable('main', 'main.c'))

@ -4,8 +4,4 @@ project('ndebug disabled', 'c',
'b_ndebug=if-release',
])
if meson.get_compiler('c').get_id() == 'msvc'
error('MESON_SKIP_TEST b_ndebug is not supported on Visual Studio')
endif
test('exe', executable('main', 'main.c'))

@ -1,7 +1,3 @@
project('ndebug enabled', 'c')
if meson.get_compiler('c').get_id() == 'msvc'
error('MESON_SKIP_TEST b_ndebug is not supported on Visual Studio')
endif
executable('main', 'main.c')

Loading…
Cancel
Save