From: Magnus Jacobsson Date: Thu, 13 Aug 2020 15:54:05 +0000 (+0200) Subject: Use dynamic run-time library in test_1767 X-Git-Tag: 2.46.0~20^2^2~118^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c54b6d1e0af2126499e75755cb539c54c11d5b5;p=graphviz Use dynamic run-time library in test_1767 From https://docs.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library?view=vs-2019: /MD Causes the application to use the multithread-specific and DLL-specific version of the run-time library. Fixes https://gitlab.com/graphviz/graphviz/-/issues/1794 --- diff --git a/rtest/test_regression.py b/rtest/test_regression.py index 2ef4f434a..b6d466f72 100644 --- a/rtest/test_regression.py +++ b/rtest/test_regression.py @@ -271,9 +271,11 @@ def test_1767(): # compile our test code exe = os.path.join(tmp, 'a.exe') + rt_lib_option = '-MDd' if os.environ.get('configuration') == 'Debug' else '-MD' + if platform.system() == 'Windows': - subprocess.check_call(['cl', c_src, '-Fe:', exe, '-nologo', '-link', - 'cgraph.lib', 'gvc.lib']) + subprocess.check_call(['cl', c_src, '-Fe:', exe, '-nologo', + rt_lib_option, '-link', 'cgraph.lib', 'gvc.lib']) else: cc = os.environ.get('CC', 'cc') subprocess.check_call([cc, c_src, '-o', exe, '-lcgraph', '-lgvc'])