-
Notifications
You must be signed in to change notification settings - Fork 100
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
Proper Compiler Detection #1086
Labels
enhancement
New feature or request
Comments
You could use the compiler_version function. Of course, you would have to
try all known compiler names, but you have to do that anyway.
Op do 10 okt 2024 om 15:31 schreef Brad Richardson ***@***.***
…:
Description
LLVM flang has now officially been renamed from flang-new to flang. Thus
the current logic of just checking whether the name of the compiler begins
with a specific string is no longer able to distinguish between Classic
flang and LLVM flang. We'll need a proper way to determine what compiler
we're invoking beyond just checking the name. This will have the added
benefit of allowing fpm to work with the Cray compiler wrappers.
Possible Solution
I believe the way CMake does it is to run something through a compiler to
see what preprocessor symbols are defined. We could probably do something
similar, but there may be a bit of chicken/egg problem if different
compilers have different ways of enabling preprocessing.
Additional Information
*No response*
—
Reply to this email directly, view it on GitHub
<#1086>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN6YRYZKHBAPWAOVF5UAZLZ2Z6SBAVCNFSM6AAAAABPWZVQECVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3TQOBWGM4TOMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@everythingfunctional @arjenmarkus When I recommended using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
LLVM flang has now officially been renamed from
flang-new
toflang
. Thus the current logic of just checking whether the name of the compiler begins with a specific string is no longer able to distinguish between Classic flang and LLVM flang. We'll need a proper way to determine what compiler we're invoking beyond just checking the name. This will have the added benefit of allowing fpm to work with the Cray compiler wrappers.Possible Solution
I believe the way CMake does it is to run something through a compiler to see what preprocessor symbols are defined. We could probably do something similar, but there may be a bit of chicken/egg problem if different compilers have different ways of enabling preprocessing.
Additional Information
No response
The text was updated successfully, but these errors were encountered: