Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/detect visual runtime type #13277

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion conans/client/conf/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ def _detect_compiler_version(result):
# Add default mandatory fields for MSVC compiler
result.append(("compiler.cppstd", "14"))
result.append(("compiler.runtime", "dynamic"))
result.append(("compiler.runtime_type", "Release"))

if compiler != "msvc":
cppstd = _cppstd_default(compiler, version)
Expand Down
17 changes: 9 additions & 8 deletions conans/test/functional/command/profile_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from conans.test.utils.mocks import RedirectedTestOutput
from conans.test.utils.tools import TestClient, redirect_output
from conans.util.env import environment_update
from conans.util.files import load, save
from conans.util.files import save
from conans.util.runners import check_output_runner


Expand Down Expand Up @@ -118,12 +118,13 @@ def test_detect_default_in_mac_os_using_gcc_as_default(self):
self.assertIn("gcc detected as a frontend using apple-clang", output)

def test_profile_new(self):
client = TestClient()
c = TestClient()
c.run("profile detect --name=./MyProfile2")
profile = c.load("MyProfile2")
assert "os=" in profile
assert "compiler.runtime_type" not in profile # Even in Windows

client.run("profile detect --name=./MyProfile2")
pr_path = os.path.join(client.current_folder, "MyProfile2")
self.assertTrue(os.path.exists(os.path.join(client.current_folder, "MyProfile2")))
self.assertIn("os=", load(pr_path))
c.run("profile detect --name=./MyProfile2", assert_error=True)
assert "MyProfile2' already exists" in c.out

client.run("profile detect --name=./MyProfile2", assert_error=True)
self.assertIn("MyProfile2' already exists", client.out)
c.run("profile detect --name=./MyProfile2 --force") # will not raise error