diff options
author | Brad King <brad.king@kitware.com> | 2021-01-06 20:29:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-06 21:21:53 (GMT) |
commit | d250b67722abcfe1bcd22511943f3e032ef1ef3d (patch) | |
tree | b23b82a7dc28a2197cf765a92c8985486140a8c4 /Source/cmXCodeObject.cxx | |
parent | 95e3ff2e88aa8dd984915e6e0373eed2bb96f17f (diff) | |
download | CMake-d250b67722abcfe1bcd22511943f3e032ef1ef3d.zip CMake-d250b67722abcfe1bcd22511943f3e032ef1ef3d.tar.gz CMake-d250b67722abcfe1bcd22511943f3e032ef1ef3d.tar.bz2 |
cmGlobalXCodeGenerator: Adopt pbxproj object id generation
Diffstat (limited to 'Source/cmXCodeObject.cxx')
-rw-r--r-- | Source/cmXCodeObject.cxx | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx index b301ab1..d5c5275 100644 --- a/Source/cmXCodeObject.cxx +++ b/Source/cmXCodeObject.cxx @@ -40,7 +40,7 @@ cmXCodeObject::~cmXCodeObject() this->Version = 15; } -cmXCodeObject::cmXCodeObject(PBXType ptype, Type type) +cmXCodeObject::cmXCodeObject(PBXType ptype, Type type, std::string id) { this->Version = 15; this->Target = nullptr; @@ -48,27 +48,7 @@ cmXCodeObject::cmXCodeObject(PBXType ptype, Type type) this->IsA = ptype; - if (type == OBJECT) { - // Set the Id of an Xcode object to a unique string for each instance. - // However the Xcode user file references certain Ids: for those cases, - // override the generated Id using SetId(). - // - char cUuid[40] = { 0 }; - CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); - CFStringRef s = CFUUIDCreateString(kCFAllocatorDefault, uuid); - CFStringGetCString(s, cUuid, sizeof(cUuid), kCFStringEncodingUTF8); - this->Id = cUuid; - CFRelease(s); - CFRelease(uuid); - } else { - this->Id = - "Temporary cmake object, should not be referred to in Xcode file"; - } - - cmSystemTools::ReplaceString(this->Id, "-", ""); - if (this->Id.size() > 24) { - this->Id = this->Id.substr(0, 24); - } + this->Id = std::move(id); this->TypeValue = type; if (this->TypeValue == OBJECT) { |