Skip to content

[bugfix] msvc in legacy cmake generators - #10195

Merged
lasote merged 2 commits into
conan-io:release/1.43from
franramirez688:bugfix/msvc_generator2
Dec 20, 2021
Merged

lasote merged 2 commits into
conan-io:release/1.43from
franramirez688:bugfix/msvc_generator2

Conversation

@franramirez688

@franramirez688 franramirez688 commented Dec 17, 2021

Copy link
Copy Markdown
Contributor

Changelog: Bugfix: Compiler msvc was not working for CMake legacy generators.
Docs: omit

Closes: #10185

  • 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.

@franramirez688
franramirez688 requested review from czoido, jgsogo, lasote and memsharded and removed request for jgsogo December 17, 2021 15:43
@franramirez688

franramirez688 commented Dec 17, 2021

Copy link
Copy Markdown
Contributor Author

TODO: one functional test with msvc compiler

UPDATE: Done

@memsharded memsharded added this to the 1.43.2 milestone Dec 17, 2021
@SSE4

SSE4 commented Dec 20, 2021

Copy link
Copy Markdown
Contributor

I think it's okay if the legacy generator doesn't support a new compiler, as we discussed in #9370. they are going to die very soon anyway.

@lasote

lasote commented Dec 20, 2021

Copy link
Copy Markdown
Contributor

The problem is with conan-center, before introducing the new generators we are breaking every recipe just because we now detect the msvc instead of Visual Studio, we want to push the migration, but not too much, this is a trade-off, and the fix is quite easy.

@lasote
lasote merged commit b8cbf28 into conan-io:release/1.43 Dec 20, 2021
@LeeRuns

LeeRuns commented Feb 20, 2022

Copy link
Copy Markdown

PLEASE explain how we are supposed to build a project today in a stable way with vs2022.
For those of us who use this platform, we cannot just wait for 2.0 to release

@memsharded

Copy link
Copy Markdown
Member

@LeeRuns please check the release notes, this was fixed in #10457 for 1.45, it is now detecting by default Visual Studio instead msvc.

And in any case, using the automatically detected profiles is not recommended for production, but using your own profile, which can define compiler="Visual Studio"

@LeeRuns

LeeRuns commented Feb 21, 2022 via email

Copy link
Copy Markdown

@memsharded

Copy link
Copy Markdown
Member

@LeeRuns the modern integrations require very little configuration. Basically this works:

$ conan new hello/0.1 --template=cmake_lib
$ conan create . -c tools.cmake.cmaketoolchain:generator=Ninja

This builds with Visual Studio and Ninja generator, both the package and the consumer project inside the test_package folder.

@LeeRuns

LeeRuns commented Feb 23, 2022 via email

Copy link
Copy Markdown

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.

6 participants