Closed edwardhartnett closed 7 months ago
FWIW, we've already been using include(TestBigEndian)
inside of CMake for quite some time to determine the endianness. Although I see now that that function is now apparently deprecated in favor of CMAKE_\<LANG>_BYTE_ORDER as of CMake v3.20, so it looks like we'll have to update that at some point.
We also no longer support EBCDIC as of #266, so that issue is now moot as well.
Furthermore, since we now only build the library with 4-byte integers as of v12.0.0, then I believe the still-existing wrdlen() logic to count the number of bytes in an integer can probably be retired as well.
Bottom line: we may well be able to fully remove wrdlen() sooner rather than later, but this still this may still need a bit of investigation to confirm whether everything it does can indeed be determined at compile time, and if so then the calls to it would also need to be removed from a number of other routines in the library.
I think that's great - remove what can be removed, and whatever is left we can try and figure out in CMake...
We have a subroutine WRDLEN(). From the documetation:
This is the kind of thing best done in CMake. CMake has all the tools to support this easily, and set up a .inc file that can be included by the Fortran code which will have all the answers.
The benefits are: