[CMake] Semantics of CMAKE_SYSTEM_PROCESSOR
Alexander Neundorf
a.neundorf-work at gmx.net
Wed Jun 25 14:36:09 EDT 2008
On Wednesday 25 June 2008, Andreas Pokorny wrote:
> Hi there,
> I am back from india, and now back into maintaining cmake for our
> project(s). Today I came across a problem regarding CMAKE_SYSTEM_PROCESSOR.
> As I understood platform definition files are supposed to set this value.
> The documentations says here:
> On systems that support uname, this variable is set to the output of
> uname -p,
> on windows it is set to the value of the environment variable
> PROCESSOR_ARCHITECTURE
>
> But uname -p and PROCESSOR_ARCHITECTURE do not really match.
> I.e. the cmake value will be x86 on windows, and i686 in linux, or maybe
> i486 depending on the distribution. In cygwin uname is supported, but for
> some reasons it returns unknown.
>
> I think in most cases the user needs a coarse information like x86
> x86_64 or arm. Then maybe in an additional variable the processor
> generation like i686 or armv4 .. and so on.
The modules which come with cmake don't actually use it AFAIK (not sure about
the cpack packaging files), so it shouldn't matter too much.
It can be used when cross compiling to be able to have more fine-grained
control regarding the target platform and to be able to supply specialized
files for it.
Alex
More information about the CMake
mailing list