summaryrefslogtreecommitdiffstats
path: root/Source/cmXCodeScheme.cxx
diff options
context:
space:
mode:
authorPatriceJiang <397136899@qq.com>2022-08-18 03:53:52 (GMT)
committerBrad King <brad.king@kitware.com>2022-08-30 14:28:27 (GMT)
commit740bee97bd131b2497c58101f7fc84b1a10a8aa6 (patch)
tree46784cd4fe677c99622886395632dca77674fa79 /Source/cmXCodeScheme.cxx
parent39456c70e1792179b4db780771fe73082122ca5f (diff)
downloadCMake-740bee97bd131b2497c58101f7fc84b1a10a8aa6.zip
CMake-740bee97bd131b2497c58101f7fc84b1a10a8aa6.tar.gz
CMake-740bee97bd131b2497c58101f7fc84b1a10a8aa6.tar.bz2
Xcode: Add settings to control a scheme's launch configuration
Diffstat (limited to 'Source/cmXCodeScheme.cxx')
-rw-r--r--Source/cmXCodeScheme.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx
index 1c609f3..e727d22 100644
--- a/Source/cmXCodeScheme.cxx
+++ b/Source/cmXCodeScheme.cxx
@@ -67,9 +67,14 @@ void cmXCodeScheme::WriteXCodeXCScheme(std::ostream& fout,
xout.Attribute("LastUpgradeVersion", WriteVersionString());
xout.Attribute("version", "1.3");
+ cmValue propDftCfg =
+ Target->GetTarget()->GetProperty("XCODE_SCHEME_LAUNCH_CONFIGURATION");
+ std::string launchConfiguration =
+ !propDftCfg.IsEmpty() ? *propDftCfg : "Debug";
+
WriteBuildAction(xout, container);
WriteTestAction(xout, FindConfiguration("Debug"), container);
- WriteLaunchAction(xout, FindConfiguration("Debug"), container);
+ WriteLaunchAction(xout, FindConfiguration(launchConfiguration), container);
WriteProfileAction(xout, FindConfiguration("Release"));
WriteAnalyzeAction(xout, FindConfiguration("Debug"));
WriteArchiveAction(xout, FindConfiguration("Release"));