diff --git a/CMakeLists.txt b/CMakeLists.txt index 60c86edd3..4fccd3ea6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)