CREATE_PROJECT: Fix Visual Studio linking problems after Munt merge
This commit is contained in:
parent
1194341b69
commit
bbef10c068
3 changed files with 11 additions and 4 deletions
|
@ -1527,7 +1527,8 @@ void ProjectProvider::addFilesToProject(const std::string &dir, std::ofstream &p
|
||||||
StringList duplicate;
|
StringList duplicate;
|
||||||
|
|
||||||
for (StringList::const_iterator i = includeList.begin(); i != includeList.end(); ++i) {
|
for (StringList::const_iterator i = includeList.begin(); i != includeList.end(); ++i) {
|
||||||
const std::string fileName = getLastPathComponent(*i);
|
std::string fileName = getLastPathComponent(*i);
|
||||||
|
std::transform(fileName.begin(), fileName.end(), fileName.begin(), tolower);
|
||||||
|
|
||||||
// Leave out non object file names.
|
// Leave out non object file names.
|
||||||
if (fileName.size() < 2 || fileName.compare(fileName.size() - 2, 2, ".o"))
|
if (fileName.size() < 2 || fileName.compare(fileName.size() - 2, 2, ".o"))
|
||||||
|
@ -1540,7 +1541,9 @@ void ProjectProvider::addFilesToProject(const std::string &dir, std::ofstream &p
|
||||||
// Search for duplicates
|
// Search for duplicates
|
||||||
StringList::const_iterator j = i; ++j;
|
StringList::const_iterator j = i; ++j;
|
||||||
for (; j != includeList.end(); ++j) {
|
for (; j != includeList.end(); ++j) {
|
||||||
if (fileName == getLastPathComponent(*j)) {
|
std::string candidateFileName = getLastPathComponent(*j);
|
||||||
|
std::transform(candidateFileName.begin(), candidateFileName.end(), candidateFileName.begin(), tolower);
|
||||||
|
if (fileName == candidateFileName) {
|
||||||
duplicate.push_back(fileName);
|
duplicate.push_back(fileName);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -514,7 +514,9 @@ void MSBuildProvider::writeFileListToProject(const FileNode &dir, std::ofstream
|
||||||
if (!_compileFiles.empty()) {
|
if (!_compileFiles.empty()) {
|
||||||
projectFile << "\t<ItemGroup>\n";
|
projectFile << "\t<ItemGroup>\n";
|
||||||
for (std::list<FileEntry>::const_iterator entry = _compileFiles.begin(); entry != _compileFiles.end(); ++entry) {
|
for (std::list<FileEntry>::const_iterator entry = _compileFiles.begin(); entry != _compileFiles.end(); ++entry) {
|
||||||
const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), (*entry).name + ".o") != duplicate.end());
|
std::string fileName = (*entry).name + ".o";
|
||||||
|
std::transform(fileName.begin(), fileName.end(), fileName.begin(), tolower);
|
||||||
|
const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), fileName) != duplicate.end());
|
||||||
|
|
||||||
// Deal with duplicated file names
|
// Deal with duplicated file names
|
||||||
if (isDuplicate) {
|
if (isDuplicate) {
|
||||||
|
|
|
@ -338,7 +338,9 @@ void VisualStudioProvider::writeFileListToProject(const FileNode &dir, std::ofst
|
||||||
if (producesObjectFile(node->name)) {
|
if (producesObjectFile(node->name)) {
|
||||||
std::string name, ext;
|
std::string name, ext;
|
||||||
splitFilename(node->name, name, ext);
|
splitFilename(node->name, name, ext);
|
||||||
const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), name + ".o") != duplicate.end());
|
name += ".o";
|
||||||
|
std::transform(name.begin(), name.end(), name.begin(), tolower);
|
||||||
|
const bool isDuplicate = (std::find(duplicate.begin(), duplicate.end(), name) != duplicate.end());
|
||||||
|
|
||||||
if (ext == "asm") {
|
if (ext == "asm") {
|
||||||
std::string objFileName = "$(IntDir)\\";
|
std::string objFileName = "$(IntDir)\\";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue