[CMake] 2.4.8 bug: CMAKE_OSX_SYSROOT is not handled consistently
Bill Hoffman
bill.hoffman at kitware.com
Thu Apr 24 21:48:03 EDT 2008
Bryan O'Sullivan wrote:
> I've spent about half the day thinking I was hallucinating because my
> setting of CMAKE_OSX_SYSROOT was apparently not being picked up. The
> reason, as it turns out, seems to be that CMake really does ignore this
> variable unless you're doing a multi-architecture build.
>
> It looks like I need one set of compilation flags for a
> single-architecture build, in which I use -isysroot explicitly, and
> another set that omits -isysroot if multi-arch.
>
> Sigh.
>
Sorry, that is my fault. When I added that stuff it was only to get
multi-architecture builds working. I guess I could do the same trick I
added for the archs. If you set the arch and it is the same as the
machine no extra flags are set, but if the arch is different than the
default, then it adds a -arch flag. I suppose the same could go for
the sysroot. If you set it to something other than the default the
-sysroot is added. I will try to get this into 2.6.0 or 2.6.1.
-Bill
More information about the CMake
mailing list