MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0012288 | CMake | CMake | public | 2011-06-20 03:57 | 2016-06-10 14:31 | |||||
Reporter | Ivan Neeson | |||||||||
Assigned To | Kitware Robot | |||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||
Status | closed | Resolution | moved | |||||||
Platform | Mac | OS | OSX | OS Version | 10.6 | |||||
Product Version | CMake 2.8.4 | |||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0012288: project/try_compile fails for XCode when CMAKE_OSX_SYSROOT is set to iPhone | |||||||||
Description | CMake will fail if CMAKE_OSX_SYSROOT is set to an iPhone SDK with the error: "target specifies product type 'com.apple.product-type.tool', but there's no such product type for the 'iphoneos' platform". If you add the CMAKE_OSX_SYSROOT after the first project() command cmake will continue, but it will fail if you ever want to use try_compile. | |||||||||
Steps To Reproduce | cmake_minimum_required (VERSION 2.6) set (CMAKE_OSX_SYSROOT "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/" CACHE PATH "" FORCE) set (CMAKE_OSX_ARCHITECTURES "armv6") set (CMAKE_C_FLAGS "-arch ${CMAKE_OSX_ARCHITECTURES} -isysroot ${CMAKE_OSX_SYSROOT} -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings" CACHE STRING "" FORCE) set (CMAKE_CXX_FLAGS "-arch ${CMAKE_OSX_ARCHITECTURES} -isysroot ${CMAKE_OSX_SYSROOT} -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings" CACHE STRING "" FORCE) set (CMAKE_AR "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar" CACHE FILEPATH "" FORCE) set (CMAKE_CXX_COMPILER "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++" CACHE FILEPATH "" FORCE) set (CMAKE_C_COMPILER "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" CACHE FILEPATH "" FORCE) set (CMAKE_INSTALL_NAME_TOOL "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/install_name_tool" CACHE FILEPATH "" FORCE) set (CMAKE_LINKER "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld" CACHE FILEPATH "" FORCE) set (CMAKE_NM "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/nm" CACHE FILEPATH "" FORCE) set (CMAKE_RANLIB "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ranlib" CACHE FILEPATH "" FORCE) set (CMAKE_STRIP "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/strip" CACHE FILEPATH "" FORCE) project (Test) | |||||||||
Additional Information | To fix this two issues will need to be resolved: - the try_compile cmTryCompileExec target will need to have the MACOSX_BUNDLE target property set on it. - the code-signing identity for the try_compile cmTryCompileExec target will need to be set. For a normal target, this can be done with: set_target_properties (cmTryCompileExec PROPERTIES MACOSX_BUNDLE ON) set_target_properties (cmTryCompileExec PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer") However this is not possible for the try_compile cmTryCompileExec target. I think the best solution for this (and future related problems) would be the addition of a feature to somehow allow users to modify the try_compile generated CMakeLists.txt file. Either via the addition of a template or a "post-fix" variable (eg CMAKE_TRY_COMPILE_POSTFIX="set_target_properties ..." | |||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | CMakeError.log (622) 2011-06-20 03:57 https://public.kitware.com/Bug/file/3950/CMakeError.log 0001-Quick-hack-to-allow-fixing-up-of-try_compile-targets.patch (1,658) 2013-02-04 15:39 https://public.kitware.com/Bug/file/4633/0001-Quick-hack-to-allow-fixing-up-of-try_compile-targets.patch 0001-Fix-try_compile-and-try_run-on-IOS.patch (1,862) 2013-02-06 20:54 https://public.kitware.com/Bug/file/4636/0001-Fix-try_compile-and-try_run-on-IOS.patch | |||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2011-06-20 03:57 | Ivan Neeson | New Issue | ||||||||
2011-06-20 03:57 | Ivan Neeson | File Added: CMakeError.log | ||||||||
2012-08-11 11:38 | David Cole | Status | new => backlog | |||||||
2012-08-11 11:38 | David Cole | Note Added: 0030312 | ||||||||
2013-01-24 07:40 | Remo Eichenberger | Note Added: 0032146 | ||||||||
2013-01-24 07:43 | Remo Eichenberger | Note Edited: 0032146 | bug_revision_view_page.php?bugnote_id=32146#r1012 | |||||||
2013-01-24 07:51 | Remo Eichenberger | Note Edited: 0032146 | bug_revision_view_page.php?bugnote_id=32146#r1013 | |||||||
2013-02-04 15:39 | David Brady | File Added: 0001-Quick-hack-to-allow-fixing-up-of-try_compile-targets.patch | ||||||||
2013-02-04 15:43 | David Brady | Note Added: 0032192 | ||||||||
2013-02-04 15:50 | David Brady | Note Added: 0032193 | ||||||||
2013-02-06 20:54 | David Brady | File Added: 0001-Fix-try_compile-and-try_run-on-IOS.patch | ||||||||
2013-02-06 20:57 | David Brady | Note Added: 0032207 | ||||||||
2014-01-16 05:24 | Piotr Wach | Note Added: 0034949 | ||||||||
2015-08-11 10:40 | Gregor Jasny | Relationship added | duplicate of 0015329 | |||||||
2016-06-10 14:28 | Kitware Robot | Note Added: 0041852 | ||||||||
2016-06-10 14:28 | Kitware Robot | Status | backlog => resolved | |||||||
2016-06-10 14:28 | Kitware Robot | Resolution | open => moved | |||||||
2016-06-10 14:28 | Kitware Robot | Assigned To | => Kitware Robot | |||||||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|