From a68e5aca0da534aa1469cccf6e48e18a8b8651c4 Mon Sep 17 00:00:00 2001 From: Luis Diaz Mas Date: Mon, 31 Jul 2017 17:19:08 +0200 Subject: [PATCH] Handle HAVE_MEMSET variable in the new cmake file --- config/CMakeChecks.txt | 4 +--- config/config.h.cmake | 4 ++-- config/generateConfigFile.cmake | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt index 021033f5..5f958c14 100644 --- a/config/CMakeChecks.txt +++ b/config/CMakeChecks.txt @@ -85,7 +85,6 @@ check_include_file( "sys/mman.h" HAVE_SYS_MMAN_H ) check_include_file( "process.h" HAVE_PROCESS_H ) check_include_file( "regex.h" HAVE_REGEX ) -check_function_exists( memset HAVE_MEMSET ) check_function_exists( mmap HAVE_MMAP ) check_function_exists( munmap HAVE_MUNMAP ) check_function_exists( realloc HAVE_REALLOC ) @@ -124,8 +123,7 @@ IF( NOT MSVC ) SET( HAVE_PID_T TRUE ) ENDIF( NOT MSVC ) -SET( EXV_SYMBOLS HAVE_MEMSET - HAVE_MMAP +SET( EXV_SYMBOLS HAVE_MMAP HAVE_MUNMAP HAVE_PRINTUCS2 HAVE_PROCESS_H diff --git a/config/config.h.cmake b/config/config.h.cmake index cc86ec91..e9b6b79c 100644 --- a/config/config.h.cmake +++ b/config/config.h.cmake @@ -56,8 +56,8 @@ // Definition to indicate you have the header file. #cmakedefine EXV_HAVE_MEMORY_H -/* Define to 1 if you have the `memset' function. */ -#cmakedefine EXV_HAVE_MEMSET 1 +// Definition to indicate if you have the `memset' function. +#cmakedefine EXV_HAVE_MEMSET /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ diff --git a/config/generateConfigFile.cmake b/config/generateConfigFile.cmake index 962b93e4..48122496 100644 --- a/config/generateConfigFile.cmake +++ b/config/generateConfigFile.cmake @@ -16,6 +16,7 @@ set(EXV_HAVE_LIBZ ${ZLIB_FOUND}) # TODO: Try to use the cmake function check_symbol_exists which is more robust check_function_exists( gmtime_r EXV_HAVE_GMTIME_R ) +check_function_exists( memset EXV_HAVE_MEMSET ) # TODO: This check should be removed and rely on the check done in findDependencies.cmake check_include_file( "libintl.h" EXV_HAVE_LIBINTL_H )