diff options
author | James Touton <bekenn@gmail.com> | 2016-06-04 01:51:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-06-17 14:49:06 (GMT) |
commit | 811f6c825271320259ed0ccdbe3c2d577ccbdcd4 (patch) | |
tree | 55e2b36a00e567ef6219d916182eea06888b7a05 /Source/cmGlobalXCodeGenerator.cxx | |
parent | ef494edf766d622f87b82e601bf6ef7405bf29d0 (diff) | |
download | CMake-811f6c825271320259ed0ccdbe3c2d577ccbdcd4.zip CMake-811f6c825271320259ed0ccdbe3c2d577ccbdcd4.tar.gz CMake-811f6c825271320259ed0ccdbe3c2d577ccbdcd4.tar.bz2 |
Xcode: Add XCODE_FILE_ATTRIBUTES source file property
This adds values to the ATTRIBUTES list in PBXBuildFile settings.
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index b439018..8eefb19 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -714,6 +714,20 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( } } + // Add user-specified file attributes. + const char* extraFileAttributes = sf->GetProperty("XCODE_FILE_ATTRIBUTES"); + if (extraFileAttributes) { + // Expand the list of attributes. + std::vector<std::string> attributes; + cmSystemTools::ExpandListArgument(extraFileAttributes, attributes); + + // Store the attributes. + for (std::vector<std::string>::const_iterator ai = attributes.begin(); + ai != attributes.end(); ++ai) { + attrs->AddObject(this->CreateString(*ai)); + } + } + settings->AddAttributeIfNotEmpty("ATTRIBUTES", attrs); // Add the fileRef to the top level Resources group/folder if it is not |