diff options
author | Philip Lowman <philip@yhbt.com> | 2011-05-26 02:10:19 (GMT) |
---|---|---|
committer | Philip Lowman <philip@yhbt.com> | 2011-05-26 02:10:19 (GMT) |
commit | 162f3fb413fc862c5c75a0402fdfbdc6dd19468b (patch) | |
tree | f38559d56af1f57a72875c4e1dbd8126fda24163 /Modules/CMakeDetermineSystem.cmake | |
parent | ca000a0948023961130d1ee389d65228a746629a (diff) | |
parent | 8b17fd67256d10c86acba9c2b2ce1d0211a90fea (diff) | |
download | CMake-162f3fb413fc862c5c75a0402fdfbdc6dd19468b.zip CMake-162f3fb413fc862c5c75a0402fdfbdc6dd19468b.tar.gz CMake-162f3fb413fc862c5c75a0402fdfbdc6dd19468b.tar.bz2 |
Merge branch 'master' of git://public.kitware.com/cmake into 12128_FindProtobuf_module_behavior_under_Windows_is_annoying
Diffstat (limited to 'Modules/CMakeDetermineSystem.cmake')
-rw-r--r-- | Modules/CMakeDetermineSystem.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake index 0e65bce..7ae3775 100644 --- a/Modules/CMakeDetermineSystem.cmake +++ b/Modules/CMakeDetermineSystem.cmake @@ -50,14 +50,17 @@ IF(CMAKE_HOST_UNIX) IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*") EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR RETURN_VALUE val) - ELSE(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*") + ELSEIF(CMAKE_HOST_SYSTEM_NAME MATCHES "OpenBSD") + EXEC_PROGRAM(arch ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR + RETURN_VALUE val) + ELSE() EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR RETURN_VALUE val) IF("${val}" GREATER 0) EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR RETURN_VALUE val) ENDIF("${val}" GREATER 0) - ENDIF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*") + ENDIF() # check the return of the last uname -m or -p IF("${val}" GREATER 0) SET(CMAKE_HOST_SYSTEM_PROCESSOR "unknown") |