Skip to content

Identify when using static runtime - #10437

Merged
memsharded merged 3 commits into
conan-io:developfrom
uilianries:feature/is_msvc_static_runtime
Jan 30, 2022
Merged

memsharded merged 3 commits into
conan-io:developfrom
uilianries:feature/is_msvc_static_runtime

Conversation

@uilianries

@uilianries uilianries commented Jan 26, 2022

Copy link
Copy Markdown
Member

Changelog: Feature: Add is_msvc_static_runtime method to conan.tools.microsoft.visual to identify when using msvc with static runtime.
Docs: conan-io/docs#2372

Related to discussion #10424 (comment)

The idea here helping static runtime identification and simplifying conditions in recipes, where can result in a prone error. Example:

def validate(self):
    if is_msvc_static_runtime(self) and self.options.shared:
        raise ConanInvalidConfiguration("Shared option is not well supported with static runtime on Windows")
  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
@uilianries uilianries changed the title Identify when using static runtime + shared option Identify when using static runtime Jan 27, 2022
@memsharded memsharded added this to the 1.45 milestone Jan 30, 2022
@memsharded
memsharded merged commit 5d02f0e into conan-io:develop Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants