More meaningful processor info

This commit is contained in:
Morgan Hardwood 2015-08-18 23:40:25 +02:00
parent 60ddd563b8
commit cd7f5d9bde

View File

@ -54,6 +54,14 @@ endif ()
if (NOT(PROC_TARGET_NUMBER EQUAL 0))
set (PROC_FLAGS ${PROC_TARGET_${PROC_TARGET_NUMBER}_FLAGS})
endif ()
if (PROC_LABEL STREQUAL "undefined")
execute_process(COMMAND uname -p OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE cpu)
if ("${cpu}" STREQUAL "unknown")
set(PROC_LABEL "${CMAKE_SYSTEM_PROCESSOR}")
else ()
set (PROC_LABEL "${cpu}")
endif ()
endif ()
# if it exists, the PROC_FORCED_LABEL value is loaded in PROC_LABEL to override the one of ProcessorTargets
if (DEFINED PROC_FORCED_LABEL)