File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -681,7 +681,23 @@ the associated runtime, you can use:
681681 - ``default_msvc_runtime(compiler) ``: returns tuple with runtime (e.g., "dynamic") and its version (e.g., "v143").
682682 - ``default_cppstd(compiler, compiler_version) ``: returns default C++ standard as a string (e.g., "gnu14").
683683 - ``detect_default_compiler() ``: returns tuple with compiler name (e.g., "gcc"), its version and the executable path.
684- - ``detect_msvc_update(version) ``: returns MSVC update version as a string (e.g., "7").
684+ - ``detect_msvc_update(version) ``: returns the MSVC update version as a string (e.g.,
685+ "12" for VS 17.12.1). Note that in Conan profiles, the ``compiler.update `` setting accepts
686+ values from 0 to 10. To convert the result from ``detect_msvc_update `` into the
687+ format required by profiles, you can do something like this:
688+
689+ Example:
690+
691+ .. code-block :: jinja
692+
693+ ...
694+ [settings]
695+ compiler=msvc
696+ compiler=194 # for msvc toolset starting in 14.40 (VS 17.10)
697+ # If we are using VS 17.12 we convert 12 to 2 so it's 194 with update 2
698+ compiler.update = "{{ (detect_api.detect_msvc_update(version) | int) % 10 }}"
699+ ...
700+
685701 - ``default_msvc_ide_version(version) ``: returns MSVC IDE version as a string (e.g., "17").
686702 - ``default_compiler_version(compiler, version) ``: returns the default version that Conan uses in profiles,
687703 typically dropping some of the minor or patch digits, that do not affect binary compatibility.
You can’t perform that action at this time.
0 commit comments