MantisBT - CMake
View Issue Details
0014690CMakeCMakepublic2014-01-09 08:452014-06-02 08:38
Arunmozhi 
Daniele E. Domenichelli 
normalmajoralways
closedfixed 
 
CMake 3.0CMake 3.0 
0014690: CheckTypeSize doesn't behave as documented in daily build
According to the documentation of CheckTypeSize ...

If the BUILTIN_TYPES_ONLY option is not given, the macro checks for headers <sys/types.h>, <stdint.h>, and <stddef.h>, and saves results in HAVE_SYS_TYPES_H, HAVE_STDINT_H, and HAVE_STDDEF_H. The type size check automatically includes the available headers, thus supporting checks of types defined in the headers.

...

The above behavior works in all versions of cmake including the current daily build 2.8.12.20140108-gc5c24.

However if there is a CHECK_TYPE_SIZE invocation with BUILTIN_TYPES_ONLY option, further CHECK_TYPE_SIZE without BUILTIN_TYPES_ONLY fails (does not detect/include the required headers <sys/types.h>, <stdint.h>, and <stddef.h>). This is observed in the daily builds (tested on 2.8.12.20140108-gc5c24).


An example CMakeLists.txt attached.
No tags attached.
txt CMakeLists.txt (321) 2014-01-09 08:45
https://public.kitware.com/Bug/file/5042/CMakeLists.txt
Issue History
2014-01-09 08:45ArunmozhiNew Issue
2014-01-09 08:45ArunmozhiFile Added: CMakeLists.txt
2014-01-09 09:34Brad KingAssigned To => Daniele E. Domenichelli
2014-01-09 09:34Brad KingStatusnew => assigned
2014-01-09 09:34Brad KingTarget Version => CMake 3.0
2014-01-09 09:34Brad KingNote Added: 0034919
2014-01-10 09:20Brad KingNote Added: 0034922
2014-01-10 09:20Brad KingStatusassigned => resolved
2014-01-10 09:20Brad KingResolutionopen => fixed
2014-01-10 09:20Brad KingFixed in Version => CMake 3.0
2014-06-02 08:38Robert MaynardNote Added: 0036073
2014-06-02 08:38Robert MaynardStatusresolved => closed

Notes
(0034919)
Brad King   
2014-01-09 09:34   
This commit is the likely culprit:

 CheckTypeSize: Add support for C++
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07a2342f [^]

because it changed the argument parsing.
(0034922)
Brad King   
2014-01-10 09:20   
CheckTypeSize: Unset temporary variables when done
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8252406c [^]
(0036073)
Robert Maynard   
2014-06-02 08:38   
Closing resolved issues that have not been updated in more than 4 months.