summaryrefslogtreecommitdiffstats
path: root/Source/cmXCodeScheme.cxx
diff options
context:
space:
mode:
authorJake Turner <jake@evansturner.co.uk>2021-10-18 05:35:11 (GMT)
committerJake Turner <jake@evansturner.co.uk>2021-10-19 14:24:10 (GMT)
commite09a3eddb61e732728bd76d63fe8098f14c737c1 (patch)
tree23fcfe6f52a5f7885d0e611f86bc95146ce059d4 /Source/cmXCodeScheme.cxx
parent52ea22ca65d86627e9ab571f2a87d4a952a7d85e (diff)
downloadCMake-e09a3eddb61e732728bd76d63fe8098f14c737c1.zip
CMake-e09a3eddb61e732728bd76d63fe8098f14c737c1.tar.gz
CMake-e09a3eddb61e732728bd76d63fe8098f14c737c1.tar.bz2
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 e2c0f2d..2755d2f 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