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

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to