Changeset View
Changeset View
Standalone View
Standalone View
src/config/CMakeLists.txt
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | |||||
" HAVE_FUNC_ATTRIBUTE_VISIBILITY) | " HAVE_FUNC_ATTRIBUTE_VISIBILITY) | ||||
check_cxx_source_compiles(" | check_cxx_source_compiles(" | ||||
__declspec(dllexport) int main() { | __declspec(dllexport) int main() { | ||||
return 0; | return 0; | ||||
} | } | ||||
" HAVE_FUNC_ATTRIBUTE_DLLEXPORT) | " HAVE_FUNC_ATTRIBUTE_DLLEXPORT) | ||||
check_cxx_source_compiles(" | |||||
// same as in src/util/system.cpp | |||||
#ifdef __linux__ | |||||
#ifdef _POSIX_C_SOURCE | |||||
#undef _POSIX_C_SOURCE | |||||
#endif | |||||
#define _POSIX_C_SOURCE 200112L | |||||
#endif // __linux__ | |||||
#include <fcntl.h> | |||||
int main() { | |||||
return posix_fallocate(0, 0, 0); | |||||
} | |||||
" HAVE_POSIX_FALLOCATE) | |||||
#__fdelt_chk's params and return type have changed from long unsigned int to | #__fdelt_chk's params and return type have changed from long unsigned int to | ||||
# long int. See which one is present here. | # long int. See which one is present here. | ||||
include(CheckPrototypeDefinition) | include(CheckPrototypeDefinition) | ||||
set(CMAKE_REQUIRED_DEFINITIONS -D_FORTIFY_SOURCE=2) | set(CMAKE_REQUIRED_DEFINITIONS -D_FORTIFY_SOURCE=2) | ||||
# Without some optimization the compiler won't detect the prototype conflict | # Without some optimization the compiler won't detect the prototype conflict | ||||
# and always succeed to build. | # and always succeed to build. | ||||
set(CMAKE_REQUIRED_FLAGS -O2) | set(CMAKE_REQUIRED_FLAGS -O2) | ||||
Show All 35 Lines |