Skip to content

Commit

Permalink
Add docs about vs_major_version
Browse files Browse the repository at this point in the history
  • Loading branch information
rwols committed Oct 6, 2019
1 parent 471ed95 commit fae6302
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeBuilder.sublime-project
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"tab_size": 4,
"translate_tabs_to_spaces": true,
"ensure_newline_at_eof_on_save": true,
"trim_trailing_white_space_on_save": true,
"rulers":
[
80
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ dictionary accepts the following keys:
argument passed to CMake. As in the case of `command_line_overrides`, the
dictionary is converted into a string as in `key1=value1;key2=value2`.

* `vs_major_version` [optional integer]

When using the Ninja generator on Windows, by default it will use the most
recent Visual Studio SDK on the system. If you need another SDK, define
the `vs_major_version` number to be 15 or 16.

Any key may be overridden by a platform-specific override. The platform keys
are one of `"linux"`, `"osx"` or `"windows"`. For an example on how this works,
see below.
Expand Down
6 changes: 3 additions & 3 deletions plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def get_vs_major_version_from_generator_str(generator_str: str) -> int:
def cmake_arch_to_vs_arch(arch: str) -> str:
if arch == "x64":
return "amd64"

elif arch == "x86":
return "x86"
elif arch == "arm":
Expand Down Expand Up @@ -331,8 +331,8 @@ def write_query(window: sublime.Window, build_folder: str) -> None:
def get_index_file(build_folder: str) -> str:
path = join(file_api_reply(build_folder), "index-")
# Whenever a new index file is generated it is given a new name and any old
# one is deleted. During the short time between these steps there may be
# multiple index files present; the one with the largest name in
# one is deleted. During the short time between these steps there may be
# multiple index files present; the one with the largest name in
# lexicographic order is the current index file.
return sorted(iglob(path + "*.json"), reverse=True)[0]

Expand Down

0 comments on commit fae6302

Please sign in to comment.