aboutsummaryrefslogtreecommitdiff
path: root/devtools/create_project/xcode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/create_project/xcode.cpp')
-rw-r--r--devtools/create_project/xcode.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp
index 8989974975..01a03d1357 100644
--- a/devtools/create_project/xcode.cpp
+++ b/devtools/create_project/xcode.cpp
@@ -560,6 +560,18 @@ void XCodeProvider::setupResourcesBuildPhase() {
}
}
+bool producesObjectFileOnOSX(const std::string &fileName) {
+ std::string n, ext;
+ splitFilename(fileName, n, ext);
+
+ // Note that the difference between this and the general producesObjectFile is that
+ // this one adds Objective-C(++), and removes asm-support.
+ if (ext == "cpp" || ext == "c" || ext == "m" || ext == "mm")
+ return true;
+ else
+ return false;
+}
+
void XCodeProvider::setupSourcesBuildPhase() {
_sourcesBuildPhase.comment = "PBXSourcesBuildPhase";
@@ -578,7 +590,7 @@ void XCodeProvider::setupSourcesBuildPhase() {
int order = 0;
for (std::vector<Object*>::iterator file = _buildFile.objects.begin(); file !=_buildFile.objects.end(); ++file) {
- if (!producesObjectFile((*file)->name)) {
+ if (!producesObjectFileOnOSX((*file)->name)) {
continue;
}
std::string comment = (*file)->name + " in Sources";