summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorRafal Parzych <rparzych@o2.pl>2018-08-16 18:49:16 (GMT)
committerBrad King <brad.king@kitware.com>2018-08-24 17:58:51 (GMT)
commitc68b358ce3c4eb132e7c6dd24effa83ce58a0bb9 (patch)
tree32fd7a180b8d47624bc33e52f1f03a552a9b81bb /Modules/CMakeDetermineCompilerId.cmake
parentba122ad2a48c58653dc033345f87fa6a717a8c8a (diff)
downloadCMake-c68b358ce3c4eb132e7c6dd24effa83ce58a0bb9.zip
CMake-c68b358ce3c4eb132e7c6dd24effa83ce58a0bb9.tar.gz
CMake-c68b358ce3c4eb132e7c6dd24effa83ce58a0bb9.tar.bz2
Xcode: Set CODE_SIGN_IDENTITY during compiler identification
If `CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY` is set then propagate it to the compiler id test project too. Fixes: #18292
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 16dde65..dc4d9be 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -355,6 +355,12 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
else()
set(id_development_team "")
endif()
+ if(DEFINED 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()
configure_file(${CMAKE_ROOT}/Modules/CompilerId/Xcode-3.pbxproj.in
${id_dir}/CompilerId${lang}.xcodeproj/project.pbxproj @ONLY)
unset(_ENV_MACOSX_DEPLOYMENT_TARGET)