summaryrefslogtreecommitdiff
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-10-22 09:57:53 -0400
committerBrad King <brad.king@kitware.com>2014-10-22 10:16:07 -0400
commitb91020f659ddc7d50868b3face370d9221c4c2dd (patch)
tree54822059b5274219f46cfe7d57e324832751aa10 /Modules/CMakeDetermineCompilerId.cmake
parentc48f6e1229b2487f98426eeced5da069a70efbf5 (diff)
downloadcmake-b91020f659ddc7d50868b3face370d9221c4c2dd.tar.gz
Xcode: Fix compiler id detection when code signing is required
The iOS product type 'com.apple.package-type.bundle.unit-test' requires code signing on Xcode 6. Other iOS target types do too. Until CMake learns to add the CODE_SIGN_IDENTITY build attribute itself, toolchain files can set CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY to tell the Xcode generator to add the attribute. Teach CMakeDetermineCompilerId to recognize this variable and add the CODE_SIGN_IDENTITY build attribute to the compiler id project.
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 77c4365d7c..613f4b3893 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -270,6 +270,11 @@ Id flags: ${testflags}
else()
set(id_sdkroot "")
endif()
+ if(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY)
+ set(id_code_sign_identity "CODE_SIGN_IDENTITY = \"${CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY}\";")
+ else()
+ set(id_code_sign_identity "")
+ endif()
if(NOT ${XCODE_VERSION} VERSION_LESS 3)
set(v 3)
set(ext xcodeproj)