Skip to content

build(cmake): fix compiler detection logic#70

Merged
awvwgk merged 1 commit into
grimme-lab:mainfrom
e-kwsm:cmake
Aug 31, 2024
Merged

build(cmake): fix compiler detection logic#70
awvwgk merged 1 commit into
grimme-lab:mainfrom
e-kwsm:cmake

Conversation

@e-kwsm
Copy link
Copy Markdown
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
@codecov
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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