The following issue has been SUBMITTED. 
====================================================================== 
https://cmake.org/Bug/view.php?id=15835 
====================================================================== 
Reported By:                David Ryskalczyk
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15835
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   high
Status:                     new
====================================================================== 
Date Submitted:             2015-11-05 16:44 EST
Last Modified:              2015-11-05 16:44 EST
====================================================================== 
Summary:                    CMake hardcodes bitness in .cmake files for
universal binaries
Description: 
CMake currently hardcodes the bitness of a built package in the .cmake config
file. As Mac OS X supports universal binaries, where a package can be compiled
as both 32 and 64 bit, this is inaccurate, and causes problems when linking to
libraries built as universal using CMAKE_OSX_ARCHITECTURES.
This affects all versions of Mac OS X.

Steps to Reproduce: 
Build a library as a universal binary (using
-DCMAKE_OSX_ARCHITECTURES=x86_64;i386); then try compiling a program that uses
that library as either x86_64 or i386. One of them will work, the other will
not. If the Config .cmake file is opened in an editor, it is obvious that the
bitness is recorded and checked, based on the value of CMAKE_SIZEOF_VOID_P —
which is inaccurate when the binary is built as universal.

Additional Information: 
A better fix might be to store a list of architectures/bitness that the package
is built as, but I'm unsure of how to do this in CMake.

A patch is attached which simply ignores the bitness section of the config
.cmake files when building on OS X.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-11-05 16:44 David RyskalczykNew Issue                                    
2015-11-05 16:44 David RyskalczykFile Added: cmake-osx-universal-patch.diff     
              
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to