On 09/29/2015 04:38 AM, Ryan Schmidt wrote:
Hello, I am a developer with the MacPorts package management system, and I want 
to report to you a bug in cmake 3.3.2 that affects OS X.

I was going to file a bug report in your issue tracker, but the bright yellow box at the 
top of the "report issue" page made it sound like I should send my report here 
instead.

The problem is that cmake cannot identify the compiler, when compiling any 
project (that uses cmake) universally (i.e. for more than one architecture, 
e.g. for both x86_64 and i386):

-- cmake version 3.3.2
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown

This could cause programs that rely on identifying the compiler to either build 
incorrectly or even (e.g. in the case of x265) to fail to build at all. For 
cross-referencing purposes, this problem was previously reported to the 
MacPorts project here:

https://trac.macports.org/ticket/48331

Is it possible that beyond setting CMAKE_OSX_ARCHITECTURES the project also tries to manually add -arch flags to CFLAGS/CXXFLAGS?

The test binary produced for compiler identification with just CMAKE_OSX_ARCHITECTURES set is not a fat binary for me and identification is successful (CMake 3.3.2).

Manually adding "-arch x86_64 -arch i386" to the compiler flags breaks this since now the test binary itself is also fat.

Nils
--

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