[Cmake-commits] [cmake-commits] king committed CMakeBackwardCompatibilityC.cmake 1.17 1.18

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Dec 1 17:35:42 EST 2009


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

Modified Files:
	CMakeBackwardCompatibilityC.cmake 
Log Message:
Use one arch for 1.4-compatible check_type_size

The CMakeBackwardCompatibilityC module provides some try-compile results
that were automatically provided by CMake 1.4.  When performing the
checks for OS X universal binaries we just pick one architecture to get
through the checks without error.  Since CMake 1.4 did not support any
universal binaries, projects that want them should not depend on this
compatibility module anyway.


Index: CMakeBackwardCompatibilityC.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeBackwardCompatibilityC.cmake,v
retrieving revision 1.17
retrieving revision 1.18
diff -C 2 -d -r1.17 -r1.18
*** CMakeBackwardCompatibilityC.cmake	28 Sep 2009 15:46:42 -0000	1.17
--- CMakeBackwardCompatibilityC.cmake	1 Dec 2009 22:35:39 -0000	1.18
***************
*** 24,27 ****
--- 24,38 ----
  
  IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
+   # Old CMake versions did not support OS X universal binaries anyway,
+   # so just get through this with at least some size for the types.
+   LIST(LENGTH CMAKE_OSX_ARCHITECTURES NUM_ARCHS)
+   IF(${NUM_ARCHS} GREATER 1)
+     IF(NOT DEFINED CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+       MESSAGE(WARNING "This module does not work with OS X universal binaries.")
+       SET(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES 1)
+       LIST(GET CMAKE_OSX_ARCHITECTURES 0 CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+     ENDIF()
+   ENDIF()
+ 
    INCLUDE (CheckTypeSize)
    CHECK_TYPE_SIZE(int      CMAKE_SIZEOF_INT)
***************
*** 71,74 ****
--- 82,90 ----
    SET (CMAKE_USE_SPROC          ${CMAKE_USE_SPROC_INIT} CACHE BOOL 
       "Use sproc libs.")
+ 
+   IF(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+     SET(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+     SET(__ERASE_CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+   ENDIF()
  ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
  



More information about the Cmake-commits mailing list