Fix Fortran Include File Generation #127
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This request takes three major actions:
#endif
The first step simply eliminates a prebuilt header because it is hard-coded and would ignore the current build configuration. If a developer is using CMake, though, the Fortran compiler (at least GNU Fortran...) will default to reading the source directory's copy of superlu_config.fh rather than one created in the build directory. This issue is especially problematic if we make the second change because...
The second change eliminates the generation of superlu_config.fh in the source directory. I don't think anyone expects a CMake build process to modify the contents of the source directory.
Finally, the sed command to generate FORTRAN/superlu_config.fh was broken because it would delete any line from SRC/superlu_config.h that contains a C comment, including the closing
#endif
which contained one. The new sed command will delete any text including and following a forward slash (rather than just deleting any line with a forward slash).