View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010774CMakeCMakepublic2010-05-28 14:172010-10-06 13:47
ReporterYaakov (Cygwin Ports) 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionCMake 2.8.3Fixed in VersionCMake 2.8.3 
Summary0010774: CMAKE_SYSTEM_PROCESSOR on Cygwin
DescriptionCMakeDetermineSystem.cmake uses `uname -p` to set CMAKE_SYSTEM_PROCESSOR on all platforms except Linux, where `uname -m` is used (commit d7b5020).

POSIX[1] requires uname -m but not -p, and indeed Cygwin uname -p returns "unknown". I gather the reason Linux is special-cased is that its uname(1) manpage[2] also says that -p may return "unknown" (git log isn't clear on the exact reason).

I see two possible solutions:

1) Special-case Cygwin together with linux, IOW change the
IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux") conditional to
IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*"), or:

2) Catch "unknown" from uname -p, changing the
IF("${val}" GREATER 0) conditional for the -m fallback to
IF("${val}" GREATER 0 OR CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "unknown").

Additional Information[1] http://www.opengroup.org/onlinepubs/9699919799/utilities/uname.html [^]
[2] http://linux.die.net/man/1/uname [^]
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0022309)
Brad King (manager)
2010-09-21 17:38

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2412d9bc [^]

 Issue History
Date Modified Username Field Change
2010-05-28 14:17 Yaakov (Cygwin Ports) New Issue
2010-09-21 17:37 Brad King Status new => assigned
2010-09-21 17:37 Brad King Assigned To => Brad King
2010-09-21 17:38 Brad King Note Added: 0022309
2010-09-21 17:38 Brad King Status assigned => closed
2010-09-21 17:38 Brad King Resolution open => fixed
2010-10-06 13:47 David Cole Fixed in Version => CMake 2.8.3
2010-10-06 13:47 David Cole Target Version => CMake 2.8.3


Copyright © 2000 - 2018 MantisBT Team