[Cmake-commits] CMake branch, next, updated. v3.0.2-2129-g85d6994

Brad King brad.king at kitware.com
Wed Oct 22 10:20:36 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  85d699437bd63249cdd7e7c87b3cf70b5fc677bc (commit)
       via  b91020f659ddc7d50868b3face370d9221c4c2dd (commit)
       via  c48f6e1229b2487f98426eeced5da069a70efbf5 (commit)
      from  9a4eb88fc1afa3011c335641a3b4f20e163eb844 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85d699437bd63249cdd7e7c87b3cf70b5fc677bc
commit 85d699437bd63249cdd7e7c87b3cf70b5fc677bc
Merge: 9a4eb88 b91020f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 22 10:20:35 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Oct 22 10:20:35 2014 -0400

    Merge topic 'xcode-ios-compiler-id' into next
    
    b91020f6 Xcode: Fix compiler id detection when code signing is required
    c48f6e12 Xcode: Fix compiler id detection for iOS tools (#15214)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b91020f659ddc7d50868b3face370d9221c4c2dd
commit b91020f659ddc7d50868b3face370d9221c4c2dd
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 22 09:57:53 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 22 10:16:07 2014 -0400

    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.

diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 77c4365..613f4b3 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)
diff --git a/Modules/CompilerId/Xcode-3.pbxproj.in b/Modules/CompilerId/Xcode-3.pbxproj.in
index cceffa0..aebae27 100644
--- a/Modules/CompilerId/Xcode-3.pbxproj.in
+++ b/Modules/CompilerId/Xcode-3.pbxproj.in
@@ -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@

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c48f6e1229b2487f98426eeced5da069a70efbf5
commit c48f6e1229b2487f98426eeced5da069a70efbf5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 22 09:37:28 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Oct 22 10:16:07 2014 -0400

    Xcode: Fix compiler id detection for iOS tools (#15214)
    
    Since commit 0cce556b (Xcode: Use sysroot and deployment target to
    identify compiler, 2014-04-29) our compiler id detection project uses
    the target platform SDK in case Xcode selects a different compiler based
    on it.  Now the compiler id project actually compiles with the target
    compiler and SDK when cross-compiling.
    
    The iOS tools do not support the 'com.apple.product-type.tool' product
    type we use in our compiler id detection project.  When targeting
    iPhone, use product type 'com.apple.product-type.bundle.unit-test'
    instead.

diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index a7b5760..77c4365 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -261,8 +261,12 @@ 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()
@@ -298,7 +302,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 +370,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..cceffa0 100644
--- a/Modules/CompilerId/Xcode-3.pbxproj.in
+++ b/Modules/CompilerId/Xcode-3.pbxproj.in
@@ -29,7 +29,7 @@
 			);
 			name = CompilerId at id_lang@;
 			productName = CompilerId at id_lang@;
-			productType = "com.apple.product-type.tool";
+			productType = "@id_product_type@";
 		};
 		08FB7793FE84155DC02AAC07 = {
 			isa = PBXProject;

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeDetermineCompilerId.cmake |   19 +++++++++++++++++--
 Modules/CompilerId/Xcode-3.pbxproj.in  |    3 ++-
 2 files changed, 19 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list