[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.13 1.14
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Nov 23 11:31:01 EST 2009
Update of /cvsroot/CMake/CMake/Utilities/cmlibarchive
In directory public:/mounts/ram/cvs-serv14249/Utilities/cmlibarchive
Modified Files:
CMakeLists.txt
Log Message:
libarchive: Use one architecture for try-compiles
We use CHECK_TYPE_SIZE in libarchive to check for the existence of some
types. For universal binary builds on the Mac, the size check can fail
if it is inconsistent across architectures. However, we do not actually
need the size so it is safe to do the checks for only one architecture.
See issue #9913.
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/CMakeLists.txt,v
retrieving revision 1.13
retrieving revision 1.14
diff -C 2 -d -r1.13 -r1.14
*** CMakeLists.txt 14 Nov 2009 03:48:31 -0000 1.13
--- CMakeLists.txt 23 Nov 2009 16:30:58 -0000 1.14
***************
*** 5,8 ****
--- 5,15 ----
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.1)
SET(CMAKE_MODULE_PATH "${libarchive_SOURCE_DIR}/build/cmake")
+
+ # We use CHECK_TYPE_SIZE for existence tests, so use only one arch.
+ LIST(LENGTH CMAKE_OSX_ARCHITECTURES NUM_ARCHS)
+ IF(${NUM_ARCHS} GREATER 1)
+ LIST(GET CMAKE_OSX_ARCHITECTURES 0 CMAKE_TRY_COMPILE_OSX_ARCHITECTURES)
+ ENDIF()
+
#
# Version - read from 'version' file.
More information about the Cmake-commits
mailing list