[CMake] Semantics of CMAKE_SYSTEM_PROCESSOR

Andreas Pokorny andreas.pokorny at gmail.com
Wed Jun 25 08:51:56 EDT 2008


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.

To make it easier for people writing platform definitions, or platform aware
cmake scripts, there should be a list of common values for the
CMAKE_SYSTEM_PROCESSOR and other similar variables.

kind regards
Andreas Pokorny


More information about the CMake mailing list