MCPcopy Create free account
hub / github.com/Kitware/CMake / ReadProperties

Method ReadProperties

Source/cmTarget.cxx:766–804  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

764}
765
766std::pair<bool, cmValue> FileSetType::ReadProperties(
767 cmTarget const* tgt, cmTargetInternals const* impl,
768 std::string const& prop) const
769{
770 bool did_read = false;
771 cmValue value = nullptr;
772 if (prop == this->DefaultDirectoryProperty) {
773 value = impl->GetFileSetDirectories(tgt, std::string(this->TypeName),
774 this->TypeName);
775 did_read = true;
776 } else if (prop == this->DefaultPathProperty) {
777 value =
778 impl->GetFileSetPaths(tgt, std::string(this->TypeName), this->TypeName);
779 did_read = true;
780 } else if (prop == this->SelfEntries.PropertyName) {
781 static std::string output;
782 output = cmList::to_string(this->SelfEntries.Entries);
783 value = cmValue(output);
784 did_read = true;
785 } else if (prop == this->InterfaceEntries.PropertyName) {
786 static std::string output;
787 output = cmList::to_string(this->InterfaceEntries.Entries);
788 value = cmValue(output);
789 did_read = true;
790 } else if (cmHasPrefix(prop, this->DirectoryPrefix)) {
791 std::string fileSetName = prop.substr(this->DirectoryPrefix.size());
792 if (!fileSetName.empty()) {
793 value = impl->GetFileSetDirectories(tgt, fileSetName, this->TypeName);
794 }
795 did_read = true;
796 } else if (cmHasPrefix(prop, this->PathPrefix)) {
797 std::string fileSetName = prop.substr(this->PathPrefix.size());
798 if (!fileSetName.empty()) {
799 value = impl->GetFileSetPaths(tgt, fileSetName, this->TypeName);
800 }
801 did_read = true;
802 }
803 return { did_read, value };
804}
805
806void FileSetType::AddFileSet(std::string const& name, cmFileSetVisibility vis,
807 cmListFileBacktrace bt)

Callers 1

GetPropertyMethod · 0.80

Calls 8

to_stringFunction · 0.85
cmHasPrefixFunction · 0.85
GetFileSetPathsMethod · 0.80
cmValueClass · 0.70
GetFileSetDirectoriesMethod · 0.45
substrMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected