From d3a64c4e3f8489c05e39240dd17963f2ab0fb283 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 16 Jul 2020 10:37:42 -0400 Subject: Xcode: Explicitly turn off signing in try_compile projects Fixes: #18407, #20571, #20688 --- Source/cmGlobalXCodeGenerator.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 2d47d2c..360807c 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3406,6 +3406,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); -- cgit v0.12