GccXmlAutoConfHints: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(New page: 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....)
 
No edit summary
Line 3: Line 3:
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:
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:


<tt>
<pre>
: /* Define to 1 if you have the `bcopy' function. */
/* Define to 1 if you have the `bcopy' function. */
: #cmakedefine HAVE_BCOPY @HAVE_BCOPY@
#cmakedefine HAVE_BCOPY @HAVE_BCOPY@


: /* Define to 1 if you have the `bsearch' function. */
/* Define to 1 if you have the `bsearch' function. */
: #cmakedefine HAVE_BSEARCH @HAVE_BSEARCH@
#cmakedefine HAVE_BSEARCH @HAVE_BSEARCH@


: /* Define to 1 if you have the `bzero' function. */
/* Define to 1 if you have the `bzero' function. */
: #cmakedefine HAVE_BZERO @HAVE_BZERO@
#cmakedefine HAVE_BZERO @HAVE_BZERO@
</tt>
</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.''
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}}

Revision as of 16:18, 26 April 2018

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 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.

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:

/* 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@

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: [Welcome | Site Map]