mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
xcode: Add XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING property
This commit is contained in:
@@ -375,6 +375,7 @@ Properties on Targets
|
||||
/prop_tgt/XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
|
||||
/prop_tgt/XCODE_SCHEME_ARGUMENTS
|
||||
/prop_tgt/XCODE_SCHEME_DEBUG_AS_ROOT
|
||||
/prop_tgt/XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
|
||||
/prop_tgt/XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
|
||||
/prop_tgt/XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
|
||||
/prop_tgt/XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
|
||||
|
||||
@@ -234,6 +234,7 @@ Variables that Change Behavior
|
||||
/variable/CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY
|
||||
/variable/CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER
|
||||
/variable/CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
|
||||
/variable/CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
|
||||
/variable/CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
|
||||
/variable/CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
|
||||
/variable/CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
|
||||
|
||||
@@ -31,9 +31,10 @@ at target creation time.
|
||||
- :prop_tgt:`XCODE_SCHEME_ZOMBIE_OBJECTS`
|
||||
|
||||
The following target properties will be applied on the
|
||||
"Info" and "Arguments" tab:
|
||||
"Info", "Arguments", and "Options" tab:
|
||||
|
||||
- :prop_tgt:`XCODE_SCHEME_ARGUMENTS`
|
||||
- :prop_tgt:`XCODE_SCHEME_DEBUG_AS_ROOT`
|
||||
- :prop_tgt:`XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING`
|
||||
- :prop_tgt:`XCODE_SCHEME_ENVIRONMENT`
|
||||
- :prop_tgt:`XCODE_SCHEME_EXECUTABLE`
|
||||
|
||||
13
Help/prop_tgt/XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING.rst
Normal file
13
Help/prop_tgt/XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING.rst
Normal file
@@ -0,0 +1,13 @@
|
||||
XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
|
||||
--------------------------------------
|
||||
|
||||
Whether to enable
|
||||
``Allow debugging when using document Versions Browser``
|
||||
in the Options section of the generated Xcode scheme.
|
||||
|
||||
This property is initialized by the value of the variable
|
||||
:variable:`CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING`
|
||||
if it is set when a target is created.
|
||||
|
||||
Please refer to the :prop_tgt:`XCODE_GENERATE_SCHEME` target property
|
||||
documentation to see all Xcode schema related properties.
|
||||
7
Help/release/dev/xcode-debug-document-versioning.rst
Normal file
7
Help/release/dev/xcode-debug-document-versioning.rst
Normal file
@@ -0,0 +1,7 @@
|
||||
xcode-debug-document-versioning
|
||||
-------------------------------
|
||||
|
||||
* The Xcode generator learnt to set the value of the
|
||||
``Allow debugging when using document Versions Browser`` schema
|
||||
option with the :prop_tgt:`XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING`
|
||||
target property.
|
||||
@@ -0,0 +1,13 @@
|
||||
CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
|
||||
--------------------------------------------
|
||||
|
||||
Whether to enable
|
||||
``Allow debugging when using document Versions Browser``
|
||||
in the Options section of the generated Xcode scheme.
|
||||
|
||||
This variable initializes the
|
||||
:prop_tgt:`XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING`
|
||||
property on all targets.
|
||||
|
||||
Please refer to the :prop_tgt:`XCODE_GENERATE_SCHEME` target property
|
||||
documentation to see all Xcode schema related properties.
|
||||
@@ -360,6 +360,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
|
||||
initProp("XCODE_GENERATE_SCHEME");
|
||||
initProp("XCODE_SCHEME_ADDRESS_SANITIZER");
|
||||
initProp("XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN");
|
||||
initProp("XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING");
|
||||
initProp("XCODE_SCHEME_THREAD_SANITIZER");
|
||||
initProp("XCODE_SCHEME_THREAD_SANITIZER_STOP");
|
||||
initProp("XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER");
|
||||
|
||||
@@ -137,7 +137,9 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout,
|
||||
xout.Attribute("launchStyle", "0");
|
||||
xout.Attribute("useCustomWorkingDirectory", "NO");
|
||||
xout.Attribute("ignoresPersistentStateOnLaunch", "NO");
|
||||
xout.Attribute("debugDocumentVersioning", "YES");
|
||||
WriteLaunchActionBooleanAttribute(xout, "debugDocumentVersioning",
|
||||
"XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING",
|
||||
true);
|
||||
xout.Attribute("debugServiceExtension", "internal");
|
||||
xout.Attribute("allowLocationSimulation", "YES");
|
||||
|
||||
@@ -311,6 +313,21 @@ bool cmXCodeScheme::WriteLaunchActionAttribute(cmXMLWriter& xout,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cmXCodeScheme::WriteLaunchActionBooleanAttribute(
|
||||
cmXMLWriter& xout, const std::string& attrName, const std::string& varName,
|
||||
bool defaultValue)
|
||||
{
|
||||
auto property = Target->GetTarget()->GetProperty(varName);
|
||||
bool isOn = (property == nullptr && defaultValue) || cmIsOn(property);
|
||||
|
||||
if (isOn) {
|
||||
xout.Attribute(attrName.c_str(), "YES");
|
||||
} else {
|
||||
xout.Attribute(attrName.c_str(), "NO");
|
||||
}
|
||||
return isOn;
|
||||
}
|
||||
|
||||
bool cmXCodeScheme::WriteLaunchActionAdditionalOption(
|
||||
cmXMLWriter& xout, const std::string& key, const std::string& value,
|
||||
const std::string& varName)
|
||||
@@ -339,7 +356,9 @@ void cmXCodeScheme::WriteProfileAction(cmXMLWriter& xout,
|
||||
xout.Attribute("shouldUseLaunchSchemeArgsEnv", "YES");
|
||||
xout.Attribute("savedToolIdentifier", "");
|
||||
xout.Attribute("useCustomWorkingDirectory", "NO");
|
||||
xout.Attribute("debugDocumentVersioning", "YES");
|
||||
WriteLaunchActionBooleanAttribute(xout, "debugDocumentVersioning",
|
||||
"XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING",
|
||||
true);
|
||||
xout.EndElement();
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,11 @@ private:
|
||||
const std::string& attrName,
|
||||
const std::string& varName);
|
||||
|
||||
bool WriteLaunchActionBooleanAttribute(cmXMLWriter& xout,
|
||||
const std::string& attrName,
|
||||
const std::string& varName,
|
||||
bool defaultValue);
|
||||
|
||||
bool WriteLaunchActionAdditionalOption(cmXMLWriter& xout,
|
||||
const std::string& attrName,
|
||||
const std::string& value,
|
||||
|
||||
Reference in New Issue
Block a user