]> git.lyx.org Git - features.git/commitdiff
Cmake build: If checking for new function, say xyzzy, we want
authorKornel Benko <kornel@lyx.org>
Tue, 12 Feb 2013 16:22:07 +0000 (17:22 +0100)
committerKornel Benko <kornel@lyx.org>
Tue, 12 Feb 2013 16:22:07 +0000 (17:22 +0100)
have a definition '#define HAVE_XYZZY 1'.
Now, it is sufficient to add xyzzy to list of functions in ConfigureChecks.cmake'

development/cmake/ConfigureChecks.cmake
development/cmake/configCompiler.h.cmake

index 83552cd755fbf05719ebe3270279f70a06ff7e0d..a18b1b77ab11f9df2fb5b7311b90c7b897442d5a 100644 (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)
index 912c315b73e1c4a1d584f4f3853f7970e006e416..904671e9059a03dd52e87bdee1c96efb6007cba2 100644 (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.
  */
 #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