Added build infrastructure, documentation, and installation support #1
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.
While this is kind of a huge and unsolicited PR, your original source files are actually unchanged.
I added CMake support for building, testing, and packaging, plus Doxygen and LaTeX support for documentation. The script
contrib/unixutils/setup_gfortran_build.sh
shows the arguments given to CMake (explicitly specifies the Fortran compiler and Release compiler options plus adds verbose Makefile diagnostics). Copy that script to thebuild
directory and run it, then runmake
to build everything. It should pull a pristine copy ofpcre-8.43.zip
fromftp.pcre.org
, unpack, and build it as a static library, then build the rest of the code. The main source is built into a static library I namedfsl_pcre
solibfsl_pcre.a
should be built, though the test programs build against the source files instead of the library (working on that part).ctest -C Release
will run all the test applications.cpack
will build zip, tar, and deb archives.make docs
will run Doxygen (if installed) to generate HTML documentation. If you have LaTeX installed, you can build PDF documentation after one manual edit (still working on fixing this). Change line 243 ofbuild/doc/latex/refman.tex
from\newcommand{\CODENAME}{fsl_pcre}
\newcommand{\CODENAME}{fsl\_pcre}
to escape the underscore in the library name, then runmake
inbuild/doc/latex
; it should grind for a little while and producerefman.pdf
.I've only tested this on Linux (Mint 19.2) with gfortran but with a little modification it should work with Intel Fortran (ifort). I haven't tested it on Windows (yet) but it likely wouldn't take a lot of work to make it work with Visual Studio and ifort (sadly, I no longer have access to ifort on Windows to test it). There's provisions for OSX support as well, but again, I don't have any Apple hardware for testing.
I understand this is a lot to take in all at once. My goal was to make this as self-contained and cross-platform as possible with professional-ish build and developer documentation. Bigger picture: Fortran really needs a decent standard library and IMO a part of that should be a regular expressions engine. My feeling is this could be an start in that direction; I came across your project and just added all the build and documentation support I could.
Let me know if you have any questions or comments, especially if you have any problems building the code.