summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeBackwardCompatibilityC.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-01-28 21:48:20 (GMT)
committerBrad King <brad.king@kitware.com>2010-01-28 21:48:20 (GMT)
commitdc1d2189ae922be9d6e7f5fde698532db47e46aa (patch)
tree28ef61aac78f0bdc190a760d53b6cb89b24262cd /Modules/CMakeBackwardCompatibilityC.cmake
parent612409e5b01a7e4823bb379ee9e002177793eb75 (diff)
downloadCMake-dc1d2189ae922be9d6e7f5fde698532db47e46aa.zip
CMake-dc1d2189ae922be9d6e7f5fde698532db47e46aa.tar.gz
CMake-dc1d2189ae922be9d6e7f5fde698532db47e46aa.tar.bz2
CMake 2.8.1-rc1
Diffstat (limited to 'Modules/CMakeBackwardCompatibilityC.cmake')
-rw-r--r--Modules/CMakeBackwardCompatibilityC.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake
index b7014cf..c6537cf 100644
--- a/Modules/CMakeBackwardCompatibilityC.cmake
+++ b/Modules/CMakeBackwardCompatibilityC.cmake
@@ -23,6 +23,17 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
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)
CHECK_TYPE_SIZE(long CMAKE_SIZEOF_LONG)
@@ -70,6 +81,11 @@ IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
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)
MARK_AS_ADVANCED(