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

Proper Compiler Detection #1086

Open
everythingfunctional opened this issue Oct 10, 2024 · 2 comments
Open

Proper Compiler Detection #1086

everythingfunctional opened this issue Oct 10, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@everythingfunctional
Copy link
Member

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

@everythingfunctional everythingfunctional added the enhancement New feature or request label Oct 10, 2024
@arjenmarkus
Copy link
Member

arjenmarkus commented Oct 10, 2024 via email

@rouson
Copy link
Contributor

rouson commented Nov 5, 2024

@everythingfunctional @arjenmarkus

When I recommended using compiler_version in issue #767 comment 1264961893, @awvwgk responded in comment 1265017260 as follows: "We cannot assume that we can run a program since we might be using a cross-compiler." I just submitted issue #1089 to offer an alternative or intermediate solution that could be simple to implement and addresses @awvwgk's concern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants