diff options
author | PatriceJiang <397136899@qq.com> | 2022-08-18 03:53:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-08-30 14:26:48 (GMT) |
commit | 39456c70e1792179b4db780771fe73082122ca5f (patch) | |
tree | cc8cab5b55b9f31e5f07e220153caf6dec15fa8e /Source/cmXCodeScheme.cxx | |
parent | 4034272ed8f4e4a19797bfd14dfe5268ad4b4324 (diff) | |
download | CMake-39456c70e1792179b4db780771fe73082122ca5f.zip CMake-39456c70e1792179b4db780771fe73082122ca5f.tar.gz CMake-39456c70e1792179b4db780771fe73082122ca5f.tar.bz2 |
Xcode: Add settings to control a scheme's GPU Validation values
Diffstat (limited to 'Source/cmXCodeScheme.cxx')
-rw-r--r-- | Source/cmXCodeScheme.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx index a62015f..1c609f3 100644 --- a/Source/cmXCodeScheme.cxx +++ b/Source/cmXCodeScheme.cxx @@ -198,6 +198,23 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout, WriteLaunchActionAttribute(xout, "enableUBSanitizer", "XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER"); + + if (cmValue value = this->Target->GetTarget()->GetProperty( + "XCODE_SCHEME_ENABLE_GPU_API_VALIDATION")) { + if (value.IsOff()) { + xout.Attribute("enableGPUValidationMode", + "1"); // unset means YES, "1" means NO + } + } + + if (cmValue value = this->Target->GetTarget()->GetProperty( + "XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION")) { + if (value.IsOn()) { + xout.Attribute("enableGPUShaderValidationMode", + "2"); // unset means NO, "2" means YES + } + } + WriteLaunchActionAttribute( xout, "stopOnEveryUBSanitizerIssue", "XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP"); |