[cmake-developers] [CMake 0016084]: try_compile incorrect behavior for iOS universal build (device + simulator) with CMAKE_IOS_INSTALL_COMBINED

Mantis Bug Tracker mantis at public.kitware.com
Wed Apr 27 06:41:34 EDT 2016


The following issue has been SUBMITTED. 
====================================================================== 
https://cmake.org/Bug/view.php?id=16084 
====================================================================== 
Reported By:                ranjak
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   16084
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2016-04-27 06:41 EDT
Last Modified:              2016-04-27 06:41 EDT
====================================================================== 
Summary:                    try_compile incorrect behavior for iOS universal
build (device + simulator) with CMAKE_IOS_INSTALL_COMBINED
Description: 
When configuring an iOS Xcode project using CMAKE_IOS_INSTALL_COMBINED
(introduced in CMake 3.5) to produce universal binaries that contain code for
both iPhone (ARM) and simulator (x86) code, I would like try_compile to compile
for both the device and the simulator. However, currently, try_compile only
compiles for the device.

This causes projects that rely on try_compile to be possibly misconfigured for
the simulator build (which can obviously lead to build failures and/or
incorrect/non-existent values for architecture-dependent parameters set at
configuration time).

This problem also arises without CMAKE_IOS_INSTALL_COMBINED, if you want to use
Xcode to build for both device(s) and simulator(s) without re-running CMake
every time you switch between the two.

Try_compile should instead call xcodebuild twice, one time with -sdk iphoneos
and the other with -sdk iphonesimulator.


Steps to Reproduce: 
Configure a project with IOS_INSTALL_COMBINED set to TRUE, and use try_compile
in this project.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-04-27 06:41 ranjak         New Issue                                    
======================================================================



More information about the cmake-developers mailing list