summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-10-22 20:49:14 (GMT)
committerBrad King <brad.king@kitware.com>2014-10-22 20:49:14 (GMT)
commit9c4551f274d4d502590c4728aeba112c92c13385 (patch)
tree96c4de23e33809800c29515459b0c19b18bbb51f /Modules
parent7d8879bb8da21216822e97e500fe3c873b791901 (diff)
parentb91020f659ddc7d50868b3face370d9221c4c2dd (diff)
downloadCMake-9c4551f274d4d502590c4728aeba112c92c13385.zip
CMake-9c4551f274d4d502590c4728aeba112c92c13385.tar.gz
CMake-9c4551f274d4d502590c4728aeba112c92c13385.tar.bz2
Merge branch 'xcode-ios-compiler-id' into release
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake19
-rw-r--r--Modules/CompilerId/Xcode-3.pbxproj.in3
2 files changed, 19 insertions, 3 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index a7b5760..613f4b3 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -261,11 +261,20 @@ Id flags: ${testflags}
else()
set(id_deployment_target "")
endif()
+ set(id_product_type "com.apple.product-type.tool")
if(CMAKE_OSX_SYSROOT)
set(id_sdkroot "SDKROOT = \"${CMAKE_OSX_SYSROOT}\";")
+ if(CMAKE_OSX_SYSROOT MATCHES "(^|/)[Ii][Pp][Hh][Oo][Nn][Ee]")
+ set(id_product_type "com.apple.product-type.bundle.unit-test")
+ endif()
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)
@@ -298,7 +307,7 @@ Id flags: ${testflags}
# ...
# /path/to/cc ...CompilerId${lang}/...
# to extract the compiler front-end for the language.
- if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerId${lang}/(\\./)?CompilerId${lang}[ \t\n\\\"]")
+ if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "\nLd[^\n]*(\n[ \t]+[^\n]*)*\n[ \t]+([^ \t\r\n]+)[^\r\n]*-o[^\r\n]*CompilerId${lang}(/CompilerId${lang}.xctest)?/(\\./)?CompilerId${lang}[ \t\n\\\"]")
set(_comp "${CMAKE_MATCH_2}")
if(EXISTS "${_comp}")
set(CMAKE_${lang}_COMPILER_ID_TOOL "${_comp}" PARENT_SCOPE)
@@ -366,7 +375,13 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT}
# binary dir.
file(GLOB files
RELATIVE ${CMAKE_${lang}_COMPILER_ID_DIR}
- ${CMAKE_${lang}_COMPILER_ID_DIR}/*)
+
+ # normal case
+ ${CMAKE_${lang}_COMPILER_ID_DIR}/*
+
+ # com.apple.package-type.bundle.unit-test
+ ${CMAKE_${lang}_COMPILER_ID_DIR}/*.xctest/*
+ )
list(REMOVE_ITEM files "${src}")
set(COMPILER_${lang}_PRODUCED_FILES "")
foreach(file ${files})
diff --git a/Modules/CompilerId/Xcode-3.pbxproj.in b/Modules/CompilerId/Xcode-3.pbxproj.in
index eabfc6b..aebae27 100644
--- a/Modules/CompilerId/Xcode-3.pbxproj.in
+++ b/Modules/CompilerId/Xcode-3.pbxproj.in
@@ -29,7 +29,7 @@
);
name = CompilerId@id_lang@;
productName = CompilerId@id_lang@;
- productType = "com.apple.product-type.tool";
+ productType = "@id_product_type@";
};
08FB7793FE84155DC02AAC07 = {
isa = PBXProject;
@@ -81,6 +81,7 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
ONLY_ACTIVE_ARCH = YES;
+ @id_code_sign_identity@
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
SYMROOT = .;
@id_toolset@