On Wed, Jan 23, 2013 at 5:29 PM, Brad King wrote: > On 01/22/2013 02:11 PM, Mojca Miklavec wrote: >> I realised that an unsupported compiler flag "-arch x86_64" >> mysteriously sneaks into Fortran_FLAGS when >> -DCMAKE_OSX_ARCHITECTURES="x86_64" > > The "-arch" flag is hard-coded here: > > > http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmLocalGenerator.cxx;hb=v2.8.10.2#l1826 > > It was added to CMake way back when universal binary support was > first added to OS X under the assumption that all compilers that > would be used in combination with CMAKE_OSX_ARCHITECTURES would > support the flag. Obviously the assumption is wrong.
True. Not even the original gcc compilers (without Apple's modifications) support the "-arch" flag. MacPorts ship the original gcc compilers and actually use them for a couple of ports. I'm not 100% sure, but some of the reasons include faster and more efficient computations in physics simulations (apparently using the latest gcc 4.8 matters) or support for Fortran. So testing for Mac OS X and GCC doesn't yet guarantee the existence of that flag. > The hard-coded flag needs to be replaced with a lookup of a new > per-language platform information variable, perhaps called > > CMAKE_<LANG>_OSX_ARCHITECTURE_FLAG Thanks a lot for the answer. Since you know the internals much better than I do: do I have to file a bug report myself? Thanks again, Mojca -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers