[CMake] Autotools->cmake: Are these checks really needed anymore?
Rolf Eike Beer
eike at sf-mail.de
Sat Aug 30 10:30:15 EDT 2014
Am Samstag, 30. August 2014, 09:18:26 schrieb Richard Shaw:
> In the project I'm converting to cmake there are a lot of checks for
> headers and functions I've reimplemented in cmake, but it seems a lot of
> autotools based programs do a lot of excessive checking and I don't want to
> implement stuff that can be safely assumed on most systems.
>
> Here's a snippet of the checks in question:
Just my personal view, YMMV
> # Checks for typedefs, structures, and compiler characteristics.
> #AC_C_CONST
> #AC_C_INLINE
I don't think you will find a compiler these days crappy enough to _not_
support them.
> #AC_TYPE_INT16_T
> #AC_TYPE_INT32_T
> #AC_TYPE_INT64_T
> #AC_TYPE_INT8_T
> #AC_TYPE_UINT16_T
> #AC_TYPE_UINT32_T
> #AC_TYPE_UINT64_T
> #AC_TYPE_UINT8_T
This is basically "is there a usable <stdint.h>" or <cstdint>. The latter you
will find in newer versions of MSVC and everything else that understands recent
C++, the former in every compiler supporting at least a decent level of C99,
which _excludes_ MSVC for policy reasons that even MS will probably find hard
to explain. So you usually don't check for these types but for the header.
> #AC_STRUCT_TM
> #AC_HEADER_TIME
This should be safe on every Un*x-like system and even Windows IIRC.
> #AC_TYPE_SIZE_T
Should be there everywhere.
> #AC_C_RESTRICT
> #AC_C_VOLATILE
I'm not sure if you should even think of using them. Especially volatile is
often something that means "you are doing something scary".
Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140830/17c394ef/attachment.sig>
More information about the CMake
mailing list