aboutsummaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
Diffstat (limited to 'devtools')
-rw-r--r--devtools/create_project/create_project.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 7d112c7ffe..de82dd1698 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -1225,10 +1225,20 @@ void ProjectProvider::createModuleList(const std::string &moduleDir, const Strin
tokens = tokenize(line);
i = tokens.begin();
} else {
- if (shouldInclude.top())
- includeList.push_back(moduleDir + "/" + unifyPath(*i));
- else
- excludeList.push_back(moduleDir + "/" + unifyPath(*i));
+ const std::string filename = moduleDir + "/" + unifyPath(*i);
+
+ if (shouldInclude.top()) {
+ // In case we should include a file, we need to make
+ // sure it is not in the exclude list already. If it
+ // is we just drop it from the exclude list.
+ excludeList.remove(filename);
+
+ includeList.push_back(filename);
+ } else if (std::find(includeList.begin(), includeList.end(), filename) == includeList.end()) {
+ // We only add the file to the exclude list in case it
+ // has not yet been added to the include list.
+ excludeList.push_back(filename);
+ }
++i;
}
}