[CMake] Cmake 2.8 and cross compilation

Bill Hoffman bill.hoffman at kitware.com
Mon Nov 16 11:45:41 EST 2009


Emmanuel Blot wrote:
> 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+)?

Can you create a bug entry for this?

As a quick fix I think if you set CMAKE_OSX_DEPLOYMENT_TARGET to empty 
it will stop CMake form doing this.  You should be able to do that 
either in the cache or in your project.

-Bill


More information about the CMake mailing list