-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Failure to detect gcc when gcc is compiled with --with-gcc-major-version-only #1127
Comments
Sorry didn't get the proper solution. How should gcc --version be invoked to get the minor too? The minor is also needed. In any case, not a critical issue, if detect fails to detect the default gcc, it can be easily configured editing |
Hi @barcharcraz, we could include this for next release, but I have been googling for a solution, and still not clear. Would it work if we did |
@memsharded I use the following code in my scripts to detect GCC version
and for clang
basically idea is to use compiler version macro rather parsing --version output which may be hard to parse in reliable manner. |
Sorry for leaving this so long unresolved. |
Opensuse has been shipping gccs that output just the major number for gcc -dumpversion for many years. In gcc7 there is a switch --with-gcc-major-version-only that triggers this behavior (and suse's gcc7 packages use it). Because of the regex used on line 28 of detect.py conan fails to detect gcc in these cases.
The text was updated successfully, but these errors were encountered: