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

build(cmake): fix compiler detection logic #70

Merged
merged 1 commit into from
Aug 31, 2024
Merged

Conversation

e-kwsm
Copy link
Contributor

@e-kwsm e-kwsm commented Aug 31, 2024

the condition wrongly matched LLVMFlang (flang-new), which does not support -Mbackslash and -Mallocatable=03.

https://cmake.org/cmake/help/v3.24/variable/CMAKE_LANG_COMPILER_ID.html

the condition wrongly matched LLVMFlang (flang-new), which does not
support -Mbackslash and -Mallocatable=03.
https://cmake.org/cmake/help/v3.24/variable/CMAKE_LANG_COMPILER_ID.html
Copy link

codecov bot commented Aug 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.78%. Comparing base (77f65c6) to head (5c0001d).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
- Coverage   69.79%   69.78%   -0.01%     
==========================================
  Files          64       64              
  Lines        8618     8639      +21     
  Branches     2579     2586       +7     
==========================================
+ Hits         6015     6029      +14     
- Misses        782      783       +1     
- Partials     1821     1827       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@e-kwsm
Copy link
Contributor Author

e-kwsm commented Aug 31, 2024

-Mbackslash corresponds to -fno-backslash (default) in LLVMFlang, but I am not sure what is the counterpart of -Mallocatable=03.

Note that flang-new 18.1.8 does not compile MCTC because it does not support polymorphic types yet.

@ajmay81
Copy link
Contributor

ajmay81 commented Aug 31, 2024

I've also just come across this after trying to update to the very latest dftd4.

-Mbackslash corresponds to -fno-backslash (default) in LLVMFlang, but I am not sure what is the counterpart of -Mallocatable=03.

Yes, those options are not needed/default with flang-new.

Note that flang-new 18.1.8 does not compile MCTC because it does not support polymorphic types yet.

It was building fine with flang-new built from their main branch:

-- The Fortran compiler identification is LLVMFlang 20.0.0

One has to add -DCMAKE_Fortran_FLAGS_RELEASE='-mmlir -allow-assumed-rank to get the experimental assumed rank implementation, but it seems to work fine. Note, one should not include this option in any cmake files since it will (hopefully) soon enough become enabled by default.

Copy link
Member

@awvwgk awvwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch thanks for sharing

@awvwgk awvwgk merged commit 6e3089c into grimme-lab:main Aug 31, 2024
10 of 11 checks passed
@e-kwsm e-kwsm deleted the cmake branch September 1, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants