Message ID | 20250721132426.3321928-1-ross.burton@arm.com |
---|---|
State | Accepted, archived |
Commit | 0ea50cba64b5004722051c0ece900443dc4ca929 |
Headers | show |
Series | [v3,1/5] cmake: remove CMAKE_SYSTEM_* from the native toolchain | expand |
diff --git a/meta/classes-recipe/cmake.bbclass b/meta/classes-recipe/cmake.bbclass index 449fe2bb443..0bb0f33a9ec 100644 --- a/meta/classes-recipe/cmake.bbclass +++ b/meta/classes-recipe/cmake.bbclass @@ -180,8 +180,6 @@ list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${includedir}) EOF cat > ${WORKDIR}/toolchain-native.cmake <<EOF -set( CMAKE_SYSTEM_NAME ${@map_host_os_to_system_name(d.getVar('BUILD_OS'))} ) -set( CMAKE_SYSTEM_PROCESSOR ${@map_host_arch_to_uname_arch(d.getVar('BUILD_ARCH'))} ) set( CMAKE_C_COMPILER ${OECMAKE_NATIVE_C_COMPILER} ) set( CMAKE_CXX_COMPILER ${OECMAKE_NATIVE_CXX_COMPILER} ) set( CMAKE_ASM_COMPILER ${OECMAKE_NATIVE_C_COMPILER} )
If these variables are set explictly then CMake assumes that it is cross-compiling[1]. We don't need to set them as the default values as detected by CMake are correct for native. [1] https://cmake.org/cmake/help/latest/variable/CMAKE_CROSSCOMPILING.html Signed-off-by: Ross Burton <ross.burton@arm.com> --- meta/classes-recipe/cmake.bbclass | 2 -- 1 file changed, 2 deletions(-)