Skip to content

Commit

Permalink
Fix intellisense errors in genvslite projects
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Roger Sanders authored and jpakkane committed Jan 1, 2024
1 parent 457161c commit e110fae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mesonbuild/backend/vs2010backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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')):
Expand All @@ -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
Expand Down

0 comments on commit e110fae

Please sign in to comment.