summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
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:21:02 (GMT)
commit7cccc5b199b5b9e2ee488d1639f37a75ab4a89d6 (patch)
tree5a11a25d58007b409364e0308bffb081cea0aafb /Source/cmTarget.cxx
parenta1f78a481c8cbda1f0c8503c4d661c3c3ddf00a6 (diff)
downloadCMake-7cccc5b199b5b9e2ee488d1639f37a75ab4a89d6.zip
CMake-7cccc5b199b5b9e2ee488d1639f37a75ab4a89d6.tar.gz
CMake-7cccc5b199b5b9e2ee488d1639f37a75ab4a89d6.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/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index c565bde..99c16f2 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -364,7 +364,6 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
initPropValue("UNITY_BUILD_BATCH_SIZE", "8");
#ifdef __APPLE__
if (this->GetGlobalGenerator()->IsXcode()) {
- initProp("XCODE_GENERATE_SCHEME");
initProp("XCODE_SCHEME_ADDRESS_SANITIZER");
initProp("XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN");
initProp("XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING");
@@ -385,6 +384,12 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
#endif
}
+ if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY) {
+ if (this->GetGlobalGenerator()->IsXcode()) {
+ initProp("XCODE_GENERATE_SCHEME");
+ }
+ }
+
// Setup per-configuration property default values.
if (this->GetType() != cmStateEnums::UTILITY) {
static const auto configProps = {