-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[REQUEST]: Add auto replacement C++ compiler options to alternative between GCC, Clang and MSVC #6196
Comments
Hello, This looks very complex to solve in the general case. We won't be able to come up with a 1:1 mapping for all options/compilers combinations. The closer we would be able to do is some find/replace for known options, but that would end up doing some pretty strange result for populated command lines... We would change some options only and get something like I don't see a good way of implementing this feature. Maybe you have better suggestion? |
It's unclear whether MSVC's |
I understand, but could you mapped I thought, GCC 's Latest, but optional feature: All other options remains without change, or removed --> It's up to you |
Also MSVC has strange behavior, even has Could you append |
Some easy examples:
etc. etc. etc. For the huge majority of switches such a translation inherently isn't possible, and I believe trying to do this for the small subset of switches where it is - would add confusion instead of decreasing it. |
I think a better solution to this is #2214, which was suggested almost 4 years ago. |
Is your feature request related to a problem? Please describe
When change gcc compiler to MSVC compiler gcc specific compiler options required manually change.
For example -O2 -Wall -std=c++20
However, these options has alternatives in MSVC. So why don't automatic replacement they?
Describe the solution you'd like
If from GCC or Clang compiler change to MSVC in compiler editor automatic replace compiler options to its alternative in MSVC compiler, for example: replace -O2 to /O2, -Wall to /Wall , -std=c++20 to /std:c++20
And vice-versa, when change compiler from MSVC to GCC or Clang automatic replace compiler options back.
Describe alternatives you've considered
There also a strange situation, when change Clang compiler to GCC,
option should be removed, or discarded in GCC compiler.
Always manually fix compiler options are tedious !
If some compiler specific compiler options can't have alternative -- may be they , simple need to deleted from options editor?
Additional context
Not applicable
The text was updated successfully, but these errors were encountered: