On Friday 25 April 2008, Bill Hoffman wrote: > Bill Hoffman wrote: > > 1. call these directly in check_type_size: > > check_include_file(sys/types.h HAVE_SYS_TYPES_H) > > check_include_file(stdint.h HAVE_STDINT_H) > > check_include_file(stddef.h HAVE_STDDEF_H) > > > > 2. Update the documentation for check_type_size to tell people that they > > need those checks. > > > > 3. Try to see if those have been called and issue a warning if they have > > not. > > > > > > I am thinking 1 is the best solution and will avoid confusion. I don't > > think it will hurt because duplicate calls will be ignored (the test > > won't be done multiple times unless a different variable name is used, > > but in that case the check type size will not have worked anyway. > > I went with 1 and did a commit. > $ cvs commit -m "ENH: make sure all required headers are checked before > checking type size" CheckTypeSize.cmake > /cvsroot/CMake/CMake/Modules/CheckTypeSize.cmake,v <-- > CheckTypeSize.cmake new revision: 1.31; previous revision: 1.30 > > -Bill
Thanks! I think that's a very good solution. I suspect I may soon be finding more issues like this. In trying to see if I can build CMake support for compiling gettext, I've been modeling after LyX's CMake files. However, their configuration-check script (http://www.lyx.org/trac/browser/lyx-devel/trunk/development/cmake/ConfigureChecks.cmake?format=raw) produces results that differ from what automake yields for a fairly large fraction of the tests. In all cases, the cmake configure script fails to find things that automake successfully finds. But, it will be a few days before I have time to get to this, and I don't know glibc internals well enough to make rapid progress. (e.g., "is the problem that _GNU_SOURCE isn't defined?" and other exciting questions like it). In the meantime, anyone have any tips? Say, am I missing some kind of automated utility that can scan a source code directory and produce the required & properly-designed cmake configuration tests? Best, --Tim _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake