Skip to content

Commit

Permalink
TST: fix test package default options to allow compilation with MSVC
Browse files Browse the repository at this point in the history
Meson by default derives the Microsoft runtime library to use from the
build type, see the documentation for the b_vscrt base option
https://mesonbuild.com/Builtin-options.html#base-options

The default build type is debug, which causes a debug version og the
runtime library to be used. This in turn causes the linker to look
for debug version of the linked DLLs. Python does not distribute a
debug version of the pythonXY.dll thus the linking fails.

Set the build type for the test package to release to fix the issue.
  • Loading branch information
dnicolodi committed Apr 5, 2023
1 parent 64edc1a commit d49aa11
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/packages/detect-compiler/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ project(
'detect-compiler',
'c',
version: '1.0',
default_options: [
'buildtype=release'
]
)

py = import('python').find_installation()
Expand Down

0 comments on commit d49aa11

Please sign in to comment.