|
|
Line 1: |
Line 1: |
| When converting from autoconf, the generation of "config.h" files can be complex. You may wish to examine the CMake scripts within the gcc-xml project at [http://www.gccxml.org/HTML/Index.html gcc-xml (XML output of gcc's internal representation)]. The project builds a modified gcc compiler using CMake. This is an impressive feat of autoconf conversion.
| | {{CMake/Template/Moved}} |
|
| |
|
| For example, the HAVE_THIS/HAVE_THAT defines used within autoconf projects can be overwhelming when converting a large project. Below is a snippet from the "config.h.in" file within gcc-xml:
| | This page has moved [https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/GccXmlAutoConfHints here]. |
| | |
| <pre>
| |
| /* Define to 1 if you have the `bcopy' function. */ | |
| #cmakedefine HAVE_BCOPY @HAVE_BCOPY@
| |
| | |
| /* Define to 1 if you have the `bsearch' function. */ | |
| #cmakedefine HAVE_BSEARCH @HAVE_BSEARCH@
| |
| | |
| /* Define to 1 if you have the `bzero' function. */ | |
| #cmakedefine HAVE_BZERO @HAVE_BZERO@
| |
| </pre>
| |
| | |
| While not a drop-in tool, their scripts are an excellent starting point. ''Be sure to reference the code from their CVS repository instead of the out-of-date tarball listed.''
| |
| | |
| {{CMake/Template/Footer}}
| |
Latest revision as of 15:41, 30 April 2018