summaryrefslogtreecommitdiff
path: root/Source/cmXCodeScheme.cxx
diff options
context:
space:
mode:
authorJake Turner <jake@evansturner.co.uk>2021-10-18 06:35:11 +0100
committerJake Turner <jake@evansturner.co.uk>2021-10-19 15:24:10 +0100
commite09a3eddb61e732728bd76d63fe8098f14c737c1 (patch)
tree23fcfe6f52a5f7885d0e611f86bc95146ce059d4 /Source/cmXCodeScheme.cxx
parent52ea22ca65d86627e9ab571f2a87d4a952a7d85e (diff)
downloadcmake-e09a3eddb61e732728bd76d63fe8098f14c737c1.tar.gz
Xcode: Support "GPU Frame Capture" scheme property
Added XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE variable which sets the scheme property value for "GPU Frame Capture" in the Options section by setting the Xcode project variable "enableGPUFrameCaptureMode". Example values are "Metal" (1) and "Disabled" (3). XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE is initialized by the property CMAKE_XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE. Implements: #22700
Diffstat (limited to 'Source/cmXCodeScheme.cxx')
-rw-r--r--Source/cmXCodeScheme.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx
index e2c0f2daf6..2755d2fcf1 100644
--- a/Source/cmXCodeScheme.cxx
+++ b/Source/cmXCodeScheme.cxx
@@ -9,6 +9,8 @@
#include <cmext/algorithm>
+#include "cmsys/String.h"
+
#include "cmGeneratedFileStream.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
@@ -148,6 +150,16 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout,
true);
xout.Attribute("debugServiceExtension", "internal");
xout.Attribute("allowLocationSimulation", "YES");
+ if (cmValue gpuFrameCaptureMode = this->Target->GetTarget()->GetProperty(
+ "XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE")) {
+ std::string value = *gpuFrameCaptureMode;
+ if (cmsysString_strcasecmp(value.c_str(), "Metal") == 0) {
+ value = "1";
+ } else if (cmsysString_strcasecmp(value.c_str(), "Disabled") == 0) {
+ value = "3";
+ }
+ xout.Attribute("enableGPUFrameCaptureMode", value);
+ }
// Diagnostics tab begin