From 79d9041d8156720d7639cb72ba8e6d98af9264d8 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Fri, 12 Oct 2007 10:58:59 -0400 Subject: [PATCH] BUG: fix for bug 0003618 , allow one arch in OSX_ARCHS to work --- Source/cmLocalGenerator.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 78570721c..3c20cf89b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1941,18 +1941,14 @@ void cmLocalGenerator::AddLanguageFlags(std::string& flags, std::vector archs; cmSystemTools::ExpandListArgument(std::string(osxArch), archs); - if((archs.size() > 1) - || ((archs.size()== 1) && this->Makefile->IsOn("CMAKE_DO_TRY_COMPILE"))) + for( std::vector::iterator i = archs.begin(); + i != archs.end(); ++i) { - for( std::vector::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);