xmlwf.1 rather than XMLWF.1; also covers case insensitive
file systems
#174 CMake: Introduce option WARNINGS_AS_ERRORS, defaults to OFF
+ #175 CMake: Prefer check_symbol_exists over check_function_exists
#131 Address compiler warnings
Special thanks to:
+ Brad King
Franek Korta
Joe Orton
Rainer Jung
include(CheckCSourceCompiles)\r
include(CheckIncludeFile)\r
include(CheckIncludeFiles)\r
-include(CheckFunctionExists)\r
include(CheckSymbolExists)\r
include(TestBigEndian)\r
\r
check_include_file("sys/types.h" HAVE_SYS_TYPES_H)\r
check_include_file("unistd.h" HAVE_UNISTD_H)\r
\r
-check_function_exists("getpagesize" HAVE_GETPAGESIZE)\r
-check_function_exists("bcopy" HAVE_BCOPY)\r
+check_symbol_exists("getpagesize" "unistd.h" HAVE_GETPAGESIZE)\r
+check_symbol_exists("bcopy" "strings.h" HAVE_BCOPY)\r
check_symbol_exists("memmove" "string.h" HAVE_MEMMOVE)\r
-check_function_exists("mmap" HAVE_MMAP)\r
-check_function_exists("getrandom" HAVE_GETRANDOM)\r
+check_symbol_exists("mmap" "sys/mman.h" HAVE_MMAP)\r
+check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM)\r
\r
if(USE_libbsd)\r
set(CMAKE_REQUIRED_LIBRARIES "${LIB_BSD}")\r
+ set(_bsd "bsd/")\r
+else()\r
+ set(_bsd "")\r
endif()\r
-check_function_exists("arc4random_buf" HAVE_ARC4RANDOM_BUF)\r
+check_symbol_exists("arc4random_buf" "${_bsd}stdlib.h" HAVE_ARC4RANDOM_BUF)\r
if(NOT HAVE_ARC4RANDOM_BUF)\r
- check_function_exists("arc4random" HAVE_ARC4RANDOM)\r
+ check_symbol_exists("arc4random" "${_bsd}stdlib.h" HAVE_ARC4RANDOM)\r
endif()\r
set(CMAKE_REQUIRED_LIBRARIES)\r
\r