[cmake-developers] Cross compiling toolchain variables
Stephen Kelly
steveire at gmail.com
Sat Nov 9 06:08:54 EST 2013
Stephen Kelly wrote:
>> We'll have to resolve this while combining CMAKE_SYSROOT and
>> CMAKE_OSX_SYSROOT.
>
> Yes, I think so too.
Thinking more about this, I'm leaning towards keeping these variables
separate.
I was trying to figure out what the user-story would be for a merged
feature. Either:
1) The user sets the CMAKE_SYSROOT to a path *or* a OSX SDK name. CMake
transforms it to a path if it is an SDK name, so that in CMake code,
CMAKE_SYSROOT is always a path.
2) The user continues to set CMAKE_OSX_SYSROOT, but CMake sets the
CMAKE_SYSROOT variable to either the path, if it is a path, or the
transformed result of an SDK name.
The (1) option seems odd to me. I guess there is precedent, in that
cmake .. -DCMAKE_CXX_COMPILER=g++-4.6
and
message("COMPILER ${CMAKE_CXX_COMPILER}")
prints
COMPILER /usr/bin/g++-4.6
But still, I'd prefer not going with option 1.
Option 2 is no better than not merging these features at all.
So, I think, without knowing more than the above, I prefer option 3: Don't
merge the features.
Thanks,
Steve.
More information about the cmake-developers
mailing list