swiftlang/swift-corelibs-libdispatch
CMakeLists.txt
:191
check_function_exists(posix_fadvise HAVE_POSIX_FADVISE)
check_function_exists(posix_fadvise HAVE_POSIX_FADVISE)
check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE)
check_function_exists(posix_fadvise HAVE_POSIX_FADVISE)
check_cxx_source_compiles("
#include <stdlib.h>
#include <fcntl.h>
#include <stdio.h>
int main() {
FILE* tmpf = tmpfile();
int input_desc = fileno(tmpf);
int test = posix_fadvise(input_desc, 0, 0, POSIX_FADV_SEQUENTIAL);
fclose(tmpf);
return 0;
}"
HAVE_POSIX_FADVISE)
target_compile_definitions(mmseqs-framework PUBLIC -DHAVE_POSIX_FADVISE=1)
check_cxx_symbol_exists (posix_fadvise fcntl.h HAVE_POSIX_FADVISE)
check_function_exists(posix_fadvise HAVE_POSIX_FADVISE)
check_symbol_exists(posix_fadvise "fcntl.h" HAVE_POSIX_FADVISE)
add_definitions(-DHAVE_POSIX_FADVISE)
check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE)
check_symbol_exists( posix_fadvise "fcntl.h" HAVE_POSIX_FADVISE )
check_function_exists(posix_fadvise HAVE_POSIX_FADVISE)