Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/file/ConfigureChecks.cmake
1 | include(CheckFunctionExists) | 1 | include(CheckFunctionExists) | ||
---|---|---|---|---|---|
2 | include(CheckLibraryExists) | 2 | include(CheckLibraryExists) | ||
3 | include(CheckSymbolExists) | ||||
3 | include(CheckIncludeFile) | 4 | include(CheckIncludeFile) | ||
4 | include(CheckIncludeFiles) | 5 | include(CheckIncludeFiles) | ||
5 | include(CheckStructHasMember) | 6 | include(CheckStructHasMember) | ||
7 | include(CheckCXXSourceCompiles) | ||||
6 | 8 | | |||
7 | check_include_files(sys/time.h HAVE_SYS_TIME_H) | 9 | check_include_files(sys/time.h HAVE_SYS_TIME_H) | ||
8 | check_include_files(string.h HAVE_STRING_H) | 10 | check_include_files(string.h HAVE_STRING_H) | ||
9 | check_include_files(limits.h HAVE_LIMITS_H) | 11 | check_include_files(limits.h HAVE_LIMITS_H) | ||
10 | check_function_exists(sendfile HAVE_SENDFILE) | 12 | check_function_exists(sendfile HAVE_SENDFILE) | ||
11 | 13 | | |||
12 | check_function_exists(posix_fadvise HAVE_FADVISE) # kioslave | 14 | check_function_exists(posix_fadvise HAVE_FADVISE) # kioslave | ||
13 | 15 | | |||
14 | check_library_exists(volmgt volmgt_running "" HAVE_VOLMGT) | 16 | check_library_exists(volmgt volmgt_running "" HAVE_VOLMGT) | ||
15 | 17 | | |||
16 | check_struct_has_member("struct dirent" d_type dirent.h HAVE_DIRENT_D_TYPE LANGUAGE CXX) | 18 | check_struct_has_member("struct dirent" d_type dirent.h HAVE_DIRENT_D_TYPE LANGUAGE CXX) | ||
19 | | ||||
20 | check_symbol_exists("__GLIBC__" "stdlib.h" LIBC_IS_GLIBC) | ||||
meven: I am not sure this is acceptable, this variable is set by ECM in extra-cmake-modules/kde… | |||||
pino: just do the test unconditionally | |||||
sorry, i realized that my sentence was ambiguous: i meant to check for the existance of statx no matter the platform pino: sorry, i realized that my sentence was ambiguous: i meant to check for the existance of statx… | |||||
We discussed previously that we would restrict using statx to the platform where it was tested i.e GLIBC to avoid future bugs with different potential different implementation of statx. meven: We discussed previously that we would restrict using statx to the platform where it was tested… | |||||
21 | if (LIBC_IS_GLIBC) | ||||
22 | check_cxx_source_compiles(" | ||||
23 | #include <fcntl.h> | ||||
24 | #include <sys/stat.h> | ||||
25 | | ||||
other than this define, try to do a simple usage of statx: struct statx buf; statx(AT_FDCWD, "/foo", AT_EMPTY_PATH, STATX_BASIC_STATS, &buf); (it will not be run anyway) pino: other than this define, try to do a simple usage of statx:
```lang=c++
struct statx buf;
statx… | |||||
26 | int main() { | ||||
27 | struct statx buf; | ||||
28 | statx(AT_FDCWD, \"/foo\", AT_EMPTY_PATH, STATX_BASIC_STATS, &buf); | ||||
29 | return 0; | ||||
30 | } | ||||
31 | " HAVE_STATX) | ||||
32 | else() | ||||
33 | set(HAVE_STATX 0) | ||||
34 | endif() |
I am not sure this is acceptable, this variable is set by ECM in extra-cmake-modules/kde-modules/KDECompilerSettings.cmake