All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cmake: Fully-qualified path to ar
@ 2021-03-17 23:25 Douglas
  0 siblings, 0 replies; only message in thread
From: Douglas @ 2021-03-17 23:25 UTC (permalink / raw)
  To: openembedded-core; +Cc: Douglas Royds

We (correctly enough) pass in our AR to cmake via the toolchain file,
but unlike the other cross-compilation tools (CC, CXX, ranlib, etc),
cmake does not then do its own search in the PATH for our AR.

By using cmake's own find_program() to search the PATH,
make works as expected from the commandline, outside of bitbake.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 meta/classes/cmake.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 70e4f3b6fd0..8876ce5aa56 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -102,7 +102,8 @@ set( CMAKE_CXX_COMPILER ${OECMAKE_CXX_COMPILER} )
 set( CMAKE_C_COMPILER_LAUNCHER ${OECMAKE_C_COMPILER_LAUNCHER} )
 set( CMAKE_CXX_COMPILER_LAUNCHER ${OECMAKE_CXX_COMPILER_LAUNCHER} )
 set( CMAKE_ASM_COMPILER ${OECMAKE_C_COMPILER} )
-set( CMAKE_AR ${OECMAKE_AR} CACHE FILEPATH "Archiver" )
+find_program( CMAKE_AR ${OECMAKE_AR} DOC "Archiver" REQUIRED )
+
 set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" )
 set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" )
 set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" )
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-17 23:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17 23:25 [PATCH] cmake: Fully-qualified path to ar Douglas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.