| 151 | } |
| 152 | |
| 153 | void 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 |
nothing calls this directly
no test coverage detected