diff options
author | Guy Harris <gharris@sonic.net> | 2021-03-22 02:47:56 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-03-22 12:38:48 -0700 |
commit | d0fdecc6b662e8871cef8309547e4ae901fe0313 (patch) | |
tree | 4e95c4efa91f7baf502cc34f567ed20c3e995abc /CMakeLists.txt | |
parent | 76f01ea72644506553ef6e6756ce2a44839e8c3f (diff) |
Replace the Large File Support CMake stuff.
The existing stuff doesn't appear to work (I tried it on 32-bit Ubuntu
18.04, and it did *not* add any flags to the compilation, as it appeared
not to conclude that they were necessary, even though they were).
Pull in the stuff from libpcap, which *does* appear to work. (it does
so in my 32-bit Ubuntu testing).
This should fix #17301.
While we're at it, fix cppcheck.sh so that it doesn't attempt to run
cppcheck on files that have been deleted.
(cherry picked from commit 0cc59d38ab6ef38e965d4de8a3ec4b80bcb5a6a3)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d86ffcc58..0dfb7e5140 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1542,9 +1542,35 @@ foreach(_plugin_src_dir ${PLUGIN_SRC_DIRS}) add_subdirectory( ${_plugin_src_dir} ) endforeach() -# Large file support (e.g. make off_t 64 bit if supported) -include(gmxTestLargeFiles) -gmx_test_large_files(GMX_LARGEFILES) +# +# Large file support on UN*X, a/k/a LFS. +# +# On Windows, we require _fseeki64() and _ftelli64(). Visual +# Studio has had supported them since Visual Studio 2005/MSVCR80, +# and we require newer versions, so we know we have them. +# +if(NOT WIN32) + include(FindLFS) + if(LFS_FOUND) + # + # Add the required #defines. + # + add_definitions(${LFS_DEFINITIONS}) + endif() + + # + # Check for fseeko as well. + # + include(FindFseeko) + if(FSEEKO_FOUND) + set(HAVE_FSEEKO ON) + + # + # Add the required #defines. + # + add_definitions(${FSEEKO_DEFINITIONS}) + endif() +endif() set( VERSION ${PROJECT_VERSION} ) if(VCSVERSION_OVERRIDE) |