[cmake-developers] Unsupported "-arch x86_64" mysteriously ends up in Fortran_FLAGS
Brad King
brad.king at kitware.com
Wed Jan 23 11:29:28 EST 2013
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.
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
-Brad
More information about the cmake-developers
mailing list