diff options
author | PatriceJiang <397136899@qq.com> | 2022-08-18 03:53:52 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-08-30 14:28:27 (GMT) |
commit | 740bee97bd131b2497c58101f7fc84b1a10a8aa6 (patch) | |
tree | 46784cd4fe677c99622886395632dca77674fa79 /Source | |
parent | 39456c70e1792179b4db780771fe73082122ca5f (diff) | |
download | CMake-740bee97bd131b2497c58101f7fc84b1a10a8aa6.zip CMake-740bee97bd131b2497c58101f7fc84b1a10a8aa6.tar.gz CMake-740bee97bd131b2497c58101f7fc84b1a10a8aa6.tar.bz2 |
Xcode: Add settings to control a scheme's launch configuration
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 1 | ||||
-rw-r--r-- | Source/cmXCodeScheme.cxx | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 8dc69fb..3448c94 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -620,6 +620,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, initProp("XCODE_SCHEME_THREAD_SANITIZER_STOP"); initProp("XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER"); initProp("XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP"); + initProp("XCODE_SCHEME_LAUNCH_CONFIGURATION"); initProp("XCODE_SCHEME_ENABLE_GPU_API_VALIDATION"); initProp("XCODE_SCHEME_ENABLE_GPU_SHADER_VALIDATION"); initProp("XCODE_SCHEME_WORKING_DIRECTORY"); 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")); |