Message ID | 20250717134806.2790027-1-ross.burton@arm.com |
---|---|
State | New |
Headers | show |
Series | [v2,1/2] cmake: remove CMAKE_SYSTEM_* from the native toolchain | expand |
On Thu, Jul 17, 2025 at 6:48 AM Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > > 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. makes sense, I think this is what I was fighting against when compiling libmusicbrainz > > [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(-) > > 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} ) > -- > 2.43.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#220544): https://lists.openembedded.org/g/openembedded-core/message/220544 > Mute This Topic: https://lists.openembedded.org/mt/114203429/1997914 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
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(-)