BUG: fix for bug 0003618 , allow one arch in OSX_ARCHS to work

This commit is contained in:
Bill Hoffman 2007-10-12 10:58:59 -04:00
parent 22fca8aa12
commit 79d9041d81
1 changed files with 6 additions and 10 deletions

View File

@ -1941,18 +1941,14 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags,
std::vector<std::string> archs;
cmSystemTools::ExpandListArgument(std::string(osxArch),
archs);
if((archs.size() > 1)
|| ((archs.size()== 1) && this->Makefile->IsOn("CMAKE_DO_TRY_COMPILE")))
for( std::vector<std::string>::iterator i = archs.begin();
i != archs.end(); ++i)
{
for( std::vector<std::string>::iterator i = archs.begin();
i != archs.end(); ++i)
{
flags += " -arch ";
flags += *i;
}
flags += " -isysroot ";
flags += sysroot;
flags += " -arch ";
flags += *i;
}
flags += " -isysroot ";
flags += sysroot;
}
}
this->AddConfigVariableFlags(flags, flagsVar.c_str(), config);