arrowdodger
2011-Jan-04 15:45 UTC
[LLVMdev] include/Config/config.h discrepancies between CMake and autofoo builds
Hello. I see many discrepancies in config.h file generated by CMake and autoheader. Most of them are following: In autofoo-generated config:> /* Define to 1 if you have the `<name>' function. */ > #define HAVE_<name> 1 >but in CMake-generated:> #undef HAVE_<name> >This happens because in config.h.cmake (config.h.in analog) these functions just are not checked for. Another difference: autofoo sets this by default:> #define ENABLE_PIC 1 >while CMake not. There are many other differencies, which bother me, so here is the question: is it harmless and if not - should i try to fix it? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110104/25cc3051/attachment.html>
Óscar Fuentes
2011-Jan-04 20:16 UTC
[LLVMdev] include/Config/config.h discrepancies between CMake and autofoo builds
arrowdodger <6yearold at gmail.com> writes:> Hello. I see many discrepancies in config.h file generated by CMake and > autoheader. > > Most of them are following: > In autofoo-generated config: > >> /* Define to 1 if you have the `<name>' function. */ >> #define HAVE_<name> 1 >> > but in CMake-generated: > >> #undef HAVE_<name> >> > This happens because in config.h.cmake (config.h.in analog) these functions > just are not checked for.Right.> Another difference: > autofoo sets this by default: > >> #define ENABLE_PIC 1 >> > while CMake not. > > There are many other differencies, which bother me, so here is the question: > is it harmless and if not - should i try to fix it?AFAIK a typical autoconf setup does not start from scratch. It reuses scripts or templates taken from some other project or from autoconf itself. This means that lots of stuff listed on config.h is not actually used by the LLVM C++ sources. The macro ENABLE_PIC is one example. config.h.cmake was derived from config.h.in and not all tests were implemented. It would be nice to test them all, just for the sake of coherence. Or to say it with other words: patches welcome.
Eric Christopher
2011-Jan-04 21:21 UTC
[LLVMdev] include/Config/config.h discrepancies between CMake and autofoo builds
On Jan 4, 2011, at 7:45 AM, arrowdodger wrote:> Hello. I see many discrepancies in config.h file generated by CMake and autoheader. > > Most of them are following: > In autofoo-generated config: > /* Define to 1 if you have the `<name>' function. */ > #define HAVE_<name> 1 > but in CMake-generated: > #undef HAVE_<name> > This happens because in config.h.cmake (config.h.in analog) these functions just are not checked for. >We may just not use those functions anymore - do you have a list of these?> Another difference: > autofoo sets this by default: > #define ENABLE_PIC 1 > while CMake not. >This is more concerning - maybe it's a windows specific problem that came along? -eric
arrowdodger
2011-Jan-05 10:13 UTC
[LLVMdev] include/Config/config.h discrepancies between CMake and autofoo builds
> > We may just not use those functions anymore - do you have a list of these? >Yes, i've started to make up a list of those functions, but it haven't finished yet.> This is more concerning - maybe it's a windows specific problem that came > along? >Not sure, i haven't look yet for CMake checking code itself. By the way, i'm using FreeBSD. Or to say it with other words: patches welcome.>So, how should i proceed? Make CMake-generated config to be identical to autotools one? Or cleanup both headers from unused stuff by Eric's suggestion? The latter seems more complex to me, since i see no other way except grep'ing all code for #define's and remove those, which aren't used anywhere. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110105/c460a906/attachment.html>
Maybe Matching Threads
- [LLVMdev] include/Config/config.h discrepancies between CMake and autofoo builds
- [LLVMdev] include/Config/config.h discrepancies between CMake and autofoo builds
- [LLVMdev] include/Config/config.h discrepancies between CMake and autofoo builds
- [LLVMdev] include/Config/config.h discrepancies between CMake and autofoo builds
- [LLVMdev] Fw: include/Config/config.h discrepancies between CMake and autofoo builds