Browse Source

Merge topic 'xcode-try_compile-no-sign'

d3a64c4e3f Xcode: Explicitly turn off signing in try_compile projects

Acked-by: Kitware Robot <[email protected]>
Merge-request: !5022
Brad King 5 years ago
parent
commit
5b419f795c
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Source/cmGlobalXCodeGenerator.cxx

+ 6 - 0
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);