Cmake build: If checking for new function, say xyzzy, we want

have a definition '#define HAVE_XYZZY 1'.
Now, it is sufficient to add xyzzy to list of functions in ConfigureChecks.cmake'
This commit is contained in:
Kornel Benko 2013-02-12 17:22:07 +01:00
parent 06cac41193
commit 5970aff01a
2 changed files with 5 additions and 42 deletions

View File

@ -39,7 +39,8 @@ check_include_files(utime.h HAVE_UTIME_H)
check_include_files(string.h HAVE_STRING_H)
check_include_files(argz.h HAVE_ARGZ_H)
set(_function_file ${TOP_BINARY_DIR}/configFunctions.h.cmake)
set(Function_Defines)
foreach(_f alloca __argz_count __argz_next __argz_stringify
chmod close _close dcgettext fcntl fork __fsetlocking
getcwd getegid getgid getpid _getpid gettext getuid lstat mempcpy mkdir _mkdir
@ -47,6 +48,7 @@ foreach(_f alloca __argz_count __argz_next __argz_stringify
setenv setlocale strcasecmp stpcpy strdup strerror strtoul tsearch unsetenv wcslen)
string(TOUPPER ${_f} _UF)
check_function_exists(${_f} HAVE_${_UF})
set(Function_Defines "${Function_Defines}#cmakedefine HAVE_${_UF} 1\n")
endforeach()
check_symbol_exists(alloca "malloc.h" HAVE_SYMBOL_ALLOCA)

View File

@ -4,7 +4,7 @@
* Licence details can be found in the file COPYING.
*
* This is the compilation configuration file for LyX.
* It was generated by autoconfs configure.
* It was generated by cmake.
* You might want to change some of the defaults if something goes wrong
* during the compilation.
*/
@ -30,46 +30,7 @@
#cmakedefine HAVE_IOS 1
#cmakedefine HAVE_LOCALE 1
#cmakedefine HAVE___ARGZ_COUNT 1
#cmakedefine HAVE___ARGZ_NEXT 1
#cmakedefine HAVE___ARGZ_STRINGIFY 1
#cmakedefine HAVE_CHMOD 1
#cmakedefine HAVE_CLOSE 1
#cmakedefine HAVE__CLOSE 1
#cmakedefine HAVE_DCGETTEXT 1
#cmakedefine HAVE_FCNTL 1
#cmakedefine HAVE_FORK
#cmakedefine HAVE___FSETLOCKING 1
#cmakedefine HAVE_GETCWD 1
#cmakedefine HAVE_GETEGID 1
#cmakedefine HAVE_GETGID 1
#cmakedefine HAVE_GETPID 1
#cmakedefine HAVE__GETPID 1
#cmakedefine HAVE_GETTEXT 1
#cmakedefine HAVE_GETUID 1
#cmakedefine HAVE_LSTAT 1
#cmakedefine HAVE_MEMPCPY 1
#cmakedefine HAVE_MKDIR 1
#cmakedefine HAVE__MKDIR 1
#cmakedefine HAVE_MKFIFO 1
#cmakedefine HAVE_OPEN 1
#cmakedefine HAVE__OPEN 1
#cmakedefine HAVE_PCLOSE 1
#cmakedefine HAVE__PCLOSE 1
#cmakedefine HAVE_POPEN 1
#cmakedefine HAVE__POPEN 1
#cmakedefine HAVE_PUTENV 1
#cmakedefine HAVE_READLINK 1
#cmakedefine HAVE_SETENV 1
#cmakedefine HAVE_SETLOCALE 1
#cmakedefine HAVE_STPCPY 1
#cmakedefine HAVE_STRCASECMP 1
#cmakedefine HAVE_STRDUP 1
#cmakedefine HAVE_STRERROR 1
#cmakedefine HAVE_STRTOUL 1
#cmakedefine HAVE_TSEARCH 1
#cmakedefine HAVE_UNSETENV 1
#cmakedefine HAVE_WCSLEN 1
${Function_Defines}
#cmakedefine HAVE_STD_COUNT 1
#cmakedefine HAVE_ASPRINTF 1