MCPcopy Create free account
hub / github.com/Kitware/CMake / WriteLaunchAction

Method WriteLaunchAction

Source/cmXCodeScheme.cxx:153–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout,
154 std::string const& configuration,
155 std::string const& container)
156{
157 xout.StartElement("LaunchAction");
158 xout.BreakAttributes();
159 xout.Attribute("buildConfiguration", configuration);
160 xout.Attribute("selectedDebuggerIdentifier",
161 "Xcode.DebuggerFoundation.Debugger.LLDB");
162 xout.Attribute("selectedLauncherIdentifier",
163 "Xcode.DebuggerFoundation.Launcher.LLDB");
164 {
165 cmValue launchMode =
166 this->Target->GetTarget()->GetProperty("XCODE_SCHEME_LAUNCH_MODE");
167 std::string value = "0"; // == 'AUTO'
168 if (launchMode && *launchMode == "WAIT"_s) {
169 value = "1";
170 }
171 xout.Attribute("launchStyle", value);
172 }
173 WriteCustomWorkingDirectory(xout, configuration);
174 WriteCustomLLDBInitFile(xout, configuration);
175
176 xout.Attribute("ignoresPersistentStateOnLaunch", "NO");
177 WriteLaunchActionBooleanAttribute(xout, "debugDocumentVersioning",
178 "XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING",
179 true);
180 xout.Attribute("debugServiceExtension", "internal");
181 xout.Attribute("allowLocationSimulation", "YES");
182 if (cmValue gpuFrameCaptureMode = this->Target->GetTarget()->GetProperty(
183 "XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE")) {
184 std::string value = *gpuFrameCaptureMode;
185 if (cmsysString_strcasecmp(value.c_str(), "Metal") == 0) {
186 value = "1";
187 } else if (cmsysString_strcasecmp(value.c_str(), "Disabled") == 0) {
188 value = "3";
189 }
190 xout.Attribute("enableGPUFrameCaptureMode", value);
191 }
192
193 // Diagnostics tab begin
194
195 bool useAddressSanitizer = WriteLaunchActionAttribute(
196 xout, "enableAddressSanitizer",
197 "XCODE_SCHEME_ADDRESS_SANITIZER"); // not allowed with
198 // enableThreadSanitizer=YES
199 WriteLaunchActionAttribute(
200 xout, "enableASanStackUseAfterReturn",
201 "XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN");
202
203 bool useThreadSanitizer = false;
204 if (!useAddressSanitizer) {
205 useThreadSanitizer = WriteLaunchActionAttribute(
206 xout, "enableThreadSanitizer",
207 "XCODE_SCHEME_THREAD_SANITIZER"); // not allowed with
208 // enableAddressSanitizer=YES
209 }
210

Callers

nothing calls this directly

Calls 14

BreakAttributesMethod · 0.80
AttributeMethod · 0.80
c_strMethod · 0.80
find_first_ofMethod · 0.80
StartElementMethod · 0.45
GetPropertyMethod · 0.45
GetTargetMethod · 0.45
IsOffMethod · 0.45
IsOnMethod · 0.45
GetPropertyAsBoolMethod · 0.45
EndElementMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected