From e110faed27616ea2a18eac160c335c3f039ac479 Mon Sep 17 00:00:00 2001 From: Roger Sanders Date: Thu, 28 Dec 2023 11:06:11 +1100 Subject: [PATCH] Fix intellisense errors in genvslite projects Standard include paths need to be added to resolve STL and platform headers. Additionally, compiler args need to be separated by spaces, not semicolons, in order to be recognised. --- mesonbuild/backend/vs2010backend.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index bcae160bf9f0..80ecc0506309 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -1118,7 +1118,7 @@ def get_build_args(compiler, optimization_level: str, debug: bool, sanitize: str # and include paths, e.g. - # '..\\some\\dir\\include;../../some/other/dir;' # and finally any remaining compiler options, e.g. - - # '/MDd;/W2;/std:c++17;/Od/Zi' + # '/MDd /W2 /std:c++17 /Od/Zi' @staticmethod def _extract_nmake_fields(captured_build_args: list[str]) -> T.Tuple[str, str, str]: include_dir_options = [ @@ -1131,7 +1131,7 @@ def _extract_nmake_fields(captured_build_args: list[str]) -> T.Tuple[str, str, s ] defs = '' - paths = '' + paths = '$(VC_IncludePath);$(WindowsSDK_IncludePath);' additional_opts = '' for arg in captured_build_args: if arg.startswith(('-D', '/D')): @@ -1141,7 +1141,7 @@ def _extract_nmake_fields(captured_build_args: list[str]) -> T.Tuple[str, str, s if opt_match: paths += arg[len(opt_match):] + ';' elif arg.startswith(('-', '/')): - additional_opts += arg + ';' + additional_opts += arg + ' ' return (defs, paths, additional_opts) @staticmethod