SetupCompilerOptions erroneously classifies "CrayClang" as "Clang"
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 296
- Forks
- 66
- Avg merge
- 1h 3m
- Merged PRs (30d)
- 1
Description
CMake provides "CrayClang" as a compiler ID for the C and CXX Cray compilers based on Clang:
https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html
SetupCompilerOptions uses `matches` for Clang to match both Clang and AppleClang:
https://github.com/LLNL/blt/blob/45494b6968553806ac90822d1bc0ed8e2df6db1f/cmake/SetupCompilerOptions.cmake#L33
This causes BLT to erroneously classify CrayClang C and CrayClang CXX as Clang mainline rather than CrayClang.
This results in situations like this:
```
-- The Fortran compiler identification is Cray 18.0.0
-- The C compiler identification is Clang 18.1.6
-- The CXX compiler identification is Clang 18.1.6
```
When specifying the cray clang compilers in cmake for CMAKE_C_COMPILER and CMAKE_CXX_COMPILER.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in cmake/SetupCompilerOptions.cmake at the Clang matching logic referenced by the issue, then compare it with CMake's compiler ID documentation. Verify that CrayClang is no longer classified as mainline Clang while Clang and AppleClang retain their intended handling; the issue does not name a test file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100