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

Scan for Kits can't detect different MinGW compilers if they have the same version #2640

Open
pbaret opened this issue Jul 7, 2022 · 3 comments
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: kits
Milestone

Comments

@pbaret
Copy link

pbaret commented Jul 7, 2022

Brief Issue Summary

When building C/C++ project on windows using MinGW compiler you have several options for a given version.
Let's say I use MinGW 8.1.0 x86_64, so GCC 8.1.0 64 bits.

There are several implementation of the corresponding MinGW on windows:

  • using posix or win32 thread
  • using seh or sjlj exception handling

Some projects will use one or the other depending on the final target or also on the libraries they are using (if the library is built with sjlj, can't compile your program with seh exception handling).

As a consequence some people might want to put in their path for example :

  • MinGW-x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0
  • MinGW-x86_64-8.1.0-release-win32-seh-rt_v6-rev0
  • MinGW-x86_64-8.1.0-release-posix-sjlj-rt_v6-rev0

The problem is that the "Scan for kits" command only displays "GCC 8.1.0 x86_64-w64-mingw32" for each one, and because of that, in the final list of kits displayed, we only see the last one of the path (the others probably getting overridden).

Suggestion:

  • separate kits from the path
  • or go a little bit further in the details (for MinGW particularly as using the wrong kit can have consequences)

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

@elahehrashedi
Copy link
Contributor

elahehrashedi commented Jul 8, 2022

We are aware of this issue. Adding different compilers causes an issue on Linux. Until the time we can find a way to solve this issue for windows without causing issues in Linux, you can use this workaround. As a workaround, you can add your own kit, by making a copy of the detected kit and modifying it.

@bobbrow
Copy link
Member

bobbrow commented Jul 8, 2022

More information on adding additional kits can be found here: https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/kits.md

@elahehrashedi elahehrashedi added the enhancement an enhancement to the product that is either not present or an improvement to an existing feature label Jul 8, 2022
@elahehrashedi elahehrashedi added this to the Backlog milestone Jul 8, 2022
@pbaret
Copy link
Author

pbaret commented Jul 11, 2022

Sorry for the duplicate then and thank you for the very quick reply. Thank you also for the work around, I'll check that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement an enhancement to the product that is either not present or an improvement to an existing feature Feature: kits
Projects
Status: Pending Prioritization
Development

No branches or pull requests

3 participants