summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-03-14 15:07:44 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-03-14 15:07:53 (GMT)
commit101621ee528c84a56d2938a6683b5a7a20999a0a (patch)
tree9733dd37e1e9afeb734ef154fa14a0c25f1f3378
parentaccbf41da54ee9cbbedd040676e02ee57d47b73b (diff)
parent40be48f8907e37e5bd1ce94d6b28f3bb4727db70 (diff)
downloadCMake-101621ee528c84a56d2938a6683b5a7a20999a0a.zip
CMake-101621ee528c84a56d2938a6683b5a7a20999a0a.tar.gz
CMake-101621ee528c84a56d2938a6683b5a7a20999a0a.tar.bz2
Merge topic 'xcodescheme'
40be48f890 XCode: Add scheme option XCODE_SCHEME_DEBUG_AS_ROOT Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3084
-rw-r--r--Auxiliary/vim/syntax/cmake.vim1
-rw-r--r--Help/manual/cmake-properties.7.rst1
-rw-r--r--Help/prop_tgt/XCODE_SCHEME_DEBUG_AS_ROOT.rst7
-rw-r--r--Help/variable/CMAKE_XCODE_GENERATE_SCHEME.rst1
-rw-r--r--Source/cmXCodeScheme.cxx5
5 files changed, 15 insertions, 0 deletions
diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim
index 7e029de..9610410 100644
--- a/Auxiliary/vim/syntax/cmake.vim
+++ b/Auxiliary/vim/syntax/cmake.vim
@@ -358,6 +358,7 @@ syn keyword cmakeProperty contained
\ XCODE_SCHEME_ADDRESS_SANITIZER
\ XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
\ XCODE_SCHEME_ARGUMENTS
+ \ XCODE_SCHEME_DEBUG_AS_ROOT
\ XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
\ XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
\ XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 16c3460..fce5584 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -353,6 +353,7 @@ Properties on Targets
/prop_tgt/XCODE_SCHEME_ADDRESS_SANITIZER
/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_DISABLE_MAIN_THREAD_CHECKER
/prop_tgt/XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
/prop_tgt/XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
diff --git a/Help/prop_tgt/XCODE_SCHEME_DEBUG_AS_ROOT.rst b/Help/prop_tgt/XCODE_SCHEME_DEBUG_AS_ROOT.rst
new file mode 100644
index 0000000..a53f836
--- /dev/null
+++ b/Help/prop_tgt/XCODE_SCHEME_DEBUG_AS_ROOT.rst
@@ -0,0 +1,7 @@
+XCODE_SCHEME_DEBUG_AS_ROOT
+--------------------------
+
+Whether to debug the target as 'root'.
+
+Please refer to the :variable:`CMAKE_XCODE_GENERATE_SCHEME` variable
+documentation to see all Xcode schema related properties.
diff --git a/Help/variable/CMAKE_XCODE_GENERATE_SCHEME.rst b/Help/variable/CMAKE_XCODE_GENERATE_SCHEME.rst
index 7466784..707c6a0 100644
--- a/Help/variable/CMAKE_XCODE_GENERATE_SCHEME.rst
+++ b/Help/variable/CMAKE_XCODE_GENERATE_SCHEME.rst
@@ -30,5 +30,6 @@ The following target properties will be applied on the
"Info" and "Arguments" tab:
- :prop_tgt:`XCODE_SCHEME_ARGUMENTS`
+- :prop_tgt:`XCODE_SCHEME_DEBUG_AS_ROOT`
- :prop_tgt:`XCODE_SCHEME_ENVIRONMENT`
- :prop_tgt:`XCODE_SCHEME_EXECUTABLE`
diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx
index 1b16198..c33bb7e 100644
--- a/Source/cmXCodeScheme.cxx
+++ b/Source/cmXCodeScheme.cxx
@@ -177,6 +177,11 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout,
WriteLaunchActionAttribute(xout, "stopOnEveryMainThreadCheckerIssue",
"XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP");
+ if (this->Target->GetTarget()->GetPropertyAsBool(
+ "XCODE_SCHEME_DEBUG_AS_ROOT")) {
+ xout.Attribute("debugAsWhichUser", "root");
+ }
+
// Diagnostics tab end
if (IsExecutable(this->Target)) {