llnl / llnl/blt

Add check/warnings for case-sensitive Fortran/FORTRAN variables

Open
#461 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

flags fortran User Request
Dominant language
C++
Stars
296
Forks
66
Avg merge
1h 3m
Merged PRs (30d)
1

Description

CMake uses the mixed-case spelling `Fortran` for fortran-related variables, such as `CMAKE_Fortran_FLAGS`.
For self-consistency, BLT uses all upper case spellings, such as `BLT_FORTRAN_FLAGS`.

Should we add some checks around the common fortran-related variables?

E.g. here:
https://github.com/LLNL/blt/blob/88909956fa8cace238e0e975eeb444c157da0ffd/cmake/SetupCompilerOptions.cmake#L141-L147
and
https://github.com/LLNL/blt/blob/88909956fa8cace238e0e975eeb444c157da0ffd/cmake/SetupCompilerOptions.cmake#L206-L211

This issue came up when working with a user code, where the capitalization issue was investigated as a possible error source.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in cmake/SetupCompilerOptions.cmake at the referenced ranges around lines 141-147 and 206-211. Review how the existing Fortran-related variables are handled and identify the common capitalization variants that should produce warnings. Done means the relevant case-sensitive spellings are checked consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.