[Cmake-commits] [cmake-commits] hoffman committed CheckTypeSize.cmake 1.31 1.32

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Apr 25 10:47:36 EDT 2008


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv8144

Modified Files:
	CheckTypeSize.cmake 
Log Message:
ENH: allow users to turn off extra checks


Index: CheckTypeSize.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CheckTypeSize.cmake,v
retrieving revision 1.31
retrieving revision 1.32
diff -C 2 -d -r1.31 -r1.32
*** CheckTypeSize.cmake	25 Apr 2008 13:09:06 -0000	1.31
--- CheckTypeSize.cmake	25 Apr 2008 14:47:34 -0000	1.32
***************
*** 1,4 ****
  # - Check sizeof a type
! #  CHECK_TYPE_SIZE(TYPE VARIABLE)
  # Check if the type exists and determine size of type.  if the type
  # exists, the size will be stored to the variable. This also
--- 1,4 ----
  # - Check sizeof a type
! #  CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY])
  # Check if the type exists and determine size of type.  if the type
  # exists, the size will be stored to the variable. This also
***************
*** 9,12 ****
--- 9,15 ----
  #  VARIABLE - variable to store size if the type exists.
  #  HAVE_${VARIABLE} - does the variable exists or not
+ #  BUILTIN_TYPES_ONLY - The third argument is optional and if 
+ #                       it is set to the string BUILTIN_TYPES_ONLY
+ #                       this macro will not check for any header files.
  # The following variables may be set before calling this macro to
  # modify the way the check is run:
***************
*** 21,29 ****
  
  include(CheckIncludeFile)
- 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)
  
  MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
    IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
      MESSAGE(STATUS "Check size of ${TYPE}")
--- 24,35 ----
  
  include(CheckIncludeFile)
  
  MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
+   IF(NOT "${ARGV2}" STREQUAL "BUILTIN_TYPES_ONLY")
+     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)
+   ENDIF(NOT "${ARGV2}" STREQUAL "BUILTIN_TYPES_ONLY")
+     
    IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
      MESSAGE(STATUS "Check size of ${TYPE}")



More information about the Cmake-commits mailing list