Use uname -m to detect processor name. Fixes issue 140.
This commit is contained in:
parent
ea42b83573
commit
5d408c0aa4
@ -5,11 +5,11 @@ SET(NV_SYSTEM_PROCESSOR "i586")
|
||||
IF(UNIX)
|
||||
FIND_PROGRAM(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
|
||||
IF(CMAKE_UNAME)
|
||||
EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE NV_SYSTEM_PROCESSOR RETURN_VALUE val)
|
||||
#EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE NV_SYSTEM_PROCESSOR RETURN_VALUE val)
|
||||
|
||||
IF("${val}" GREATER 0 OR NV_SYSTEM_PROCESSOR STREQUAL "unknown")
|
||||
#IF("${val}" GREATER 0 OR NV_SYSTEM_PROCESSOR STREQUAL "unknown")
|
||||
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE NV_SYSTEM_PROCESSOR RETURN_VALUE val)
|
||||
ENDIF("${val}" GREATER 0 OR NV_SYSTEM_PROCESSOR STREQUAL "unknown")
|
||||
#ENDIF("${val}" GREATER 0 OR NV_SYSTEM_PROCESSOR STREQUAL "unknown")
|
||||
|
||||
# processor may have double quote in the name, and that needs to be removed
|
||||
STRING(REGEX REPLACE "\"" "" NV_SYSTEM_PROCESSOR "${NV_SYSTEM_PROCESSOR}")
|
||||
@ -57,7 +57,7 @@ ELSE(UNIX)
|
||||
# It's not OK to trust $ENV{PROCESSOR_ARCHITECTURE}: its value depends on the type of executable being run,
|
||||
# so a 32-bit cmake (the default binary distribution) will always say "x86" regardless of the actual target.
|
||||
IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
SET (NV_SYSTEM_PROCESSOR "AMD64")
|
||||
SET (NV_SYSTEM_PROCESSOR "x86_64")
|
||||
ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
SET (NV_SYSTEM_PROCESSOR "x86")
|
||||
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
@ -73,7 +73,7 @@ ELSE (APPLE)
|
||||
DOC "The directory where Cg/cg.h resides"
|
||||
)
|
||||
|
||||
IF (NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
|
||||
IF (NV_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
FIND_LIBRARY( CG_LIBRARY
|
||||
NAMES Cg
|
||||
PATHS
|
||||
@ -100,7 +100,7 @@ ELSE (APPLE)
|
||||
${CG_COMPILER_DIR}
|
||||
DOC "The Cg GL runtime library (64-bit)"
|
||||
)
|
||||
ELSE(NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
|
||||
ELSE(NV_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
FIND_LIBRARY( CG_LIBRARY
|
||||
NAMES Cg
|
||||
PATHS
|
||||
@ -123,7 +123,7 @@ ELSE (APPLE)
|
||||
${CG_COMPILER_DIR}
|
||||
DOC "The Cg GL runtime library"
|
||||
)
|
||||
ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
|
||||
ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
|
||||
ELSE (WIN32)
|
||||
FIND_PROGRAM( CG_COMPILER cgc
|
||||
|
Loading…
Reference in New Issue
Block a user