summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-16 14:37:42 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2020-08-10 12:28:38 (GMT)
commit97d581b25d8b6d1fb0d43190a58898b04629914a (patch)
tree08ab8d6015adcb55a41d35e3c66827f69fb3b065
parent13e5df19fdeaf16ff51819caf322a426ecaf328c (diff)
downloadCMake-97d581b25d8b6d1fb0d43190a58898b04629914a.zip
CMake-97d581b25d8b6d1fb0d43190a58898b04629914a.tar.gz
CMake-97d581b25d8b6d1fb0d43190a58898b04629914a.tar.bz2
Xcode: Explicitly turn off signing in try_compile projects
Fixes: #18407, #20571, #20688
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index f0737e8..b28395a 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3158,6 +3158,12 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
std::string symroot = cmStrCat(root->GetCurrentBinaryDirectory(), "/build");
buildSettings->AddAttribute("SYMROOT", this->CreateString(symroot));
+ // Inside a try_compile project, do not require signing on any platform.
+ if (this->CMakeInstance->GetIsInTryCompile()) {
+ buildSettings->AddAttribute("CODE_SIGNING_ALLOWED",
+ this->CreateString("NO"));
+ }
+
for (auto& config : configs) {
cmXCodeObject* buildSettingsForCfg = this->CreateFlatClone(buildSettings);