[CMake] Cmake 2.8 and cross compilation

Emmanuel Blot eblot.ml at gmail.com
Mon Nov 16 05:30:51 EST 2009


Hi All,

I've just upgraded my CMake installation to 2.8.0, as my collegues
reported me some compilation errors with the new release of CMake
(they use Debian/unstable).

Before I'm able to reproduce the same error they got, I got another
error, on Mac OS X hosts.
It seems that CMake 2.8.0 forces compiler option such as:
"-mmacosx-version-min=10.6", *whatever the compiler being used*.

The trouble is that our projects use a GCC cross compiler, not Apple's.
So this option is fully invalid with a GCC compiler that does not
target a Mac OS X host.

How can I disable this new (invalid) option - and be sure that the
resulting CMakeLists.txt keeps working with previous releases of CMake
(2.6+)?

Thanks,
Emmanuel.


More information about the CMake mailing list