summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-12-29 19:26:46 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-12-29 19:26:46 (GMT)
commit46aaf2dae8440f8dcd5fada61368b5b29c263085 (patch)
treea2f1db3d81c363a05dd899c10bcbc2751334ed39 /Modules
parentde30a184a2f9d3753a23e68edbc6787a173a505a (diff)
downloadCMake-46aaf2dae8440f8dcd5fada61368b5b29c263085.zip
CMake-46aaf2dae8440f8dcd5fada61368b5b29c263085.tar.gz
CMake-46aaf2dae8440f8dcd5fada61368b5b29c263085.tar.bz2
ERR: On systems where uname does not support -p, try -m. Fixes Bug #426 - CMAKE_SYSTEM_PROCESSOR unknown and inconsistent
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineSystem.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
index 922a48c..2a1007b 100644
--- a/Modules/CMakeDetermineSystem.cmake
+++ b/Modules/CMakeDetermineSystem.cmake
@@ -31,6 +31,12 @@ IF(UNIX)
EXEC_PROGRAM(uname ARGS -s OUTPUT_VARIABLE CMAKE_SYSTEM_NAME)
EXEC_PROGRAM(uname ARGS -r OUTPUT_VARIABLE CMAKE_SYSTEM_VERSION)
EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR)
+ IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "--help")
+ EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR)
+ ENDIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "--help")
+ IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "--help")
+ SET(CMAKE_SYSTEM_PROCESSOR "unknown")
+ ENDIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "--help")
SET(CMAKE_UNAME ${CMAKE_UNAME} CACHE INTERNAL "uname command")
ENDIF(CMAKE_UNAME)
ELSE(UNIX)