summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-02 12:15:05 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-02 12:17:32 (GMT)
commitac9934406da6793a8c841db6d53f292f65124ed7 (patch)
treeb3f77209eb61e2e1dfc80e3b13e7d000113e451d /Source
parent6fb747a01c27a2226fe4cbf77bc19e6d21286f81 (diff)
downloadCMake-ac9934406da6793a8c841db6d53f292f65124ed7.zip
CMake-ac9934406da6793a8c841db6d53f292f65124ed7.tar.gz
CMake-ac9934406da6793a8c841db6d53f292f65124ed7.tar.bz2
Xcode: Restore CMAKE_XCODE_GENERATE_SCHEME for custom targets
The target property introduced by commit 413b71485a (Xcode: Create Xcode schemes per target, 2019-03-11, v3.15.0-rc1~347^2) was accidentally not initialized by `CMAKE_XCODE_GENERATE_SCHEME` for custom targets. Fix it and update the test. Fixes: #19759
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTarget.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a67122c..98c66da 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -334,7 +334,6 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
InitProperty("VS_JUST_MY_CODE_DEBUGGING", nullptr);
#ifdef __APPLE__
if (this->GetGlobalGenerator()->IsXcode()) {
- InitProperty("XCODE_GENERATE_SCHEME", nullptr);
InitProperty("XCODE_SCHEME_ADDRESS_SANITIZER", nullptr);
InitProperty("XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN", nullptr);
InitProperty("XCODE_SCHEME_THREAD_SANITIZER", nullptr);
@@ -354,6 +353,12 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
#endif
}
+ if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY) {
+ if (this->GetGlobalGenerator()->IsXcode()) {
+ InitProperty("XCODE_GENERATE_SCHEME", nullptr);
+ }
+ }
+
// Setup per-configuration property default values.
if (this->GetType() != cmStateEnums::UTILITY) {
static const auto configProps = {