Build fails with errors like this one (cross-compile on an x86_64 Linux for a Linux running on an i.MX6 with g++ 9.2.1):
error: inlining failed in call to always_inline 'void vst1q_u8(uint8_t*, uint8x16_t)': target specific option mismatch
Cause: The platform is not detected correctly. Thus incorrect compiler options are inferred:
-- Platform: x86_64
Changing the else branch of
function(DumpMachine output pattern)
if (MSVC)
# CMake does not provide a generic shell/terminal mechanism
# and Microsoft environments don't know what 'sh' is.
set(${output} 0 PARENT_SCOPE)
else ()
if(CMAKE_SYSTEM_PROCESSOR MATCHES ${pattern})
set(${output} TRUE PARENT_SCOPE)
endif()
endif()
endfunction(DumpMachine)
back to the old version from 8.2.0
function(DumpMachine output pattern)
if (MSVC)
# CMake does not provide a generic shell/terminal mechanism
# and Microsoft environments don't know what 'sh' is.
set(${output} 0 PARENT_SCOPE)
else ()
execute_process(
COMMAND sh -c "${CMAKE_CXX_COMPILER} -dumpmachine 2>&1"
COMMAND ${GREP_CMD} -i -c -E "${pattern}"
OUTPUT_VARIABLE ${output}
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(${output} "${${output}}" PARENT_SCOPE)
endif()
endfunction(DumpMachine)
Build fails with errors like this one (cross-compile on an x86_64 Linux for a Linux running on an i.MX6 with g++ 9.2.1):
Cause: The platform is not detected correctly. Thus incorrect compiler options are inferred:
Changing the else branch of
back to the old version from 8.2.0
in CMakeLists.txt fixes the problem.