summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-16 14:37:42 (GMT)
committerBrad King <brad.king@kitware.com>2020-07-16 14:42:39 (GMT)
commitd3a64c4e3f8489c05e39240dd17963f2ab0fb283 (patch)
tree50b91c0aebe533381c5d6dfa1175ce173bfbeac0 /Source
parentc7b7547d8da6b9a4225d111440d0cf6c2f55914d (diff)
downloadCMake-d3a64c4e3f8489c05e39240dd17963f2ab0fb283.zip
CMake-d3a64c4e3f8489c05e39240dd17963f2ab0fb283.tar.gz
CMake-d3a64c4e3f8489c05e39240dd17963f2ab0fb283.tar.bz2
Xcode: Explicitly turn off signing in try_compile projects
Fixes: #18407, #20571, #20688
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx6
1 files changed, 6 insertions, 0 deletions
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);