-
Notifications
You must be signed in to change notification settings - Fork 68
Refactor CMake fortran module install to be case insensitive #1186
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
Refactor CMake fortran module install to be case insensitive #1186
Conversation
@BradWhitlock @cyrush Can you eyeball this? I'm trying to get a working build of conduit with a Cray compiler. Due to some peculiarities of the platform and using a mixed vendor compiler build, I do not have the ability to use the '-ef' flag to have Cray produce lowercase module names. This PR changes the current INSTALL commands using explicit module names with a single INSTALL using the module directory. It works, but it does alter the prior design of having the install commands broken out over the blueprint, relay, and core lib cmake logic. It's now a single install command that will copy all files in the fortran module directory that conduit produces, so you lose control over having an explicit file list of fortran modules. Not sure if conduit produces any fortran modules you don't want available to a downstream library. |
I tried a build on rzvernal and then linked a Fortran test program against the installed build. It worked and I did not use the -ef flag. Build
Test program
Test program CMakeLists.txt
My only criticism would be that all modules get installed, even the ones for Conduit test programs.
|
I hoped that CMake would give us a way to inspect the names of the generated modules, but not sure that exists given general discussion about installing fortran modules: https://gitlab.kitware.com/cmake/cmake/-/issues/19608 We could look for both upper and lowercase version for each lib we care about? Your current solution might be the best compromise even if the modules for tests have to go along for the ride |
Re-opened this, as I couldn't find a better implementation that worked. |
@aaroncblack thanks for testing out these solutions and helping us converge. |
The current conduit CMake logic expects lower case fortran modules names. This currently breaks when using the Cray compiler (which produces uppercase name).
This update alters the install logic to install the fortran modules by DIRECTORY rather than a specific FILE list.