CMake issueshttps://gitlab.kitware.com/cmake/cmake/-/issues2020-01-20T17:06:23-05:00https://gitlab.kitware.com/cmake/cmake/-/issues/20173CrayPrgEnv incorrectly sets CMAKE_SHARED_LIBRARY_LINK_<lang>_FLAGS to -dynamic2020-01-20T17:06:23-05:00Kyle EdwardsCrayPrgEnv incorrectly sets CMAKE_SHARED_LIBRARY_LINK_<lang>_FLAGS to -dynamicFrom `Modules/Compiler/CrayPrgEnv.cmake:118-121`:
```cmake
# Flags for the Cray wrappers
set(CMAKE_STATIC_LIBRARY_LINK_${lang}_FLAGS "-static")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
set(CMAKE_SHARED_LIBRARY_LI...From `Modules/Compiler/CrayPrgEnv.cmake:118-121`:
```cmake
# Flags for the Cray wrappers
set(CMAKE_STATIC_LIBRARY_LINK_${lang}_FLAGS "-static")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-dynamic")
```
The purpose of `CMAKE_SHARED_LIBRARY_LINK_<lang>_FLAGS` is to create executables that *export* symbols, rather than to *import* symbols from a shared library. However, the `-dynamic` flag on the Cray compiler wrapper does the latter. This can result in executables incorrectly linking against shared libraries when static libraries are desired, especially if [`CMP0065`](https://cmake.org/cmake/help/latest/policy/CMP0065.html) is set to `OLD` or `WARN`.
As an aside, `CMAKE_STATIC_LIBRARY_LINK_<lang>_FLAGS` does not appear anywhere else in CMake, and can probably be removed.https://gitlab.kitware.com/cmake/cmake/-/issues/18925Fortran module and submodule support for Cray Fortran2019-08-22T12:07:35-04:00Brad KingFortran module and submodule support for Cray FortranDiscussion in !2958 identified that Cray Fortran uses upper-case module names:
```
Submodules/PARENT.mod
Submodules/CHILD.mod
```
It may also be told to use lower-case names via the `-f` flag.
This will need additional work beyond tha...Discussion in !2958 identified that Cray Fortran uses upper-case module names:
```
Submodules/PARENT.mod
Submodules/CHILD.mod
```
It may also be told to use lower-case names via the `-f` flag.
This will need additional work beyond that MR to handle, even for plain modules.
The Ninja generator in particular needs to know the exact file name.