* [PATCH] cmake.bbclass: don't remove build directory for out-of-tree builds
@ 2020-10-27 13:13 Alvin Sipraga
2020-10-27 13:18 ` [poky] " Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Alvin Sipraga @ 2020-10-27 13:13 UTC (permalink / raw)
To: poky; +Cc: Alvin Sipraga
Rather than removing the whole of ${WORKDIR}/build on every do_configure
step, just clean up CMake files to trigger a fresh reconfiguration of
CMake.
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
---
meta/classes/cmake.bbclass | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 7c055e8a3d..39f356099e 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -151,13 +151,7 @@ cmake_do_configure() {
bbnote "cmake.bbclass no longer uses OECMAKE_BUILDPATH. The default behaviour is now out-of-tree builds with B=WORKDIR/build."
fi
- if [ "${S}" != "${B}" ]; then
- rm -rf ${B}
- mkdir -p ${B}
- cd ${B}
- else
- find ${B} -name CMakeFiles -or -name Makefile -or -name cmake_install.cmake -or -name CMakeCache.txt -delete
- fi
+ find ${B} -name CMakeFiles -or -name Makefile -or -name cmake_install.cmake -or -name CMakeCache.txt -delete
# Just like autotools cmake can use a site file to cache result that need generated binaries to run
if [ -e ${WORKDIR}/site-file.cmake ] ; then
--
2.29.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [poky] [PATCH] cmake.bbclass: don't remove build directory for out-of-tree builds
2020-10-27 13:13 [PATCH] cmake.bbclass: don't remove build directory for out-of-tree builds Alvin Sipraga
@ 2020-10-27 13:18 ` Richard Purdie
2020-10-28 9:00 ` Alvin Sipraga
0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2020-10-27 13:18 UTC (permalink / raw)
To: ALSI, poky
On Tue, 2020-10-27 at 13:13 +0000, Alvin Sipraga via lists.yoctoproject.org wrote:
> Rather than removing the whole of ${WORKDIR}/build on every do_configure
> step, just clean up CMake files to trigger a fresh reconfiguration of
> CMake.
>
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
> ---
> meta/classes/cmake.bbclass | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index 7c055e8a3d..39f356099e 100644
> --- a/meta/classes/cmake.bbclass
> +++ b/meta/classes/cmake.bbclass
> @@ -151,13 +151,7 @@ cmake_do_configure() {
> bbnote "cmake.bbclass no longer uses OECMAKE_BUILDPATH. The default behaviour is now out-of-tree builds with B=WORKDIR/build."
> fi
>
> - if [ "${S}" != "${B}" ]; then
> - rm -rf ${B}
> - mkdir -p ${B}
> - cd ${B}
> - else
> - find ${B} -name CMakeFiles -or -name Makefile -or -name cmake_install.cmake -or -name CMakeCache.txt -delete
> - fi
> + find ${B} -name CMakeFiles -or -name Makefile -or -name cmake_install.cmake -or -name CMakeCache.txt -delete
>
> # Just like autotools cmake can use a site file to cache result that need generated binaries to run
> if [ -e ${WORKDIR}/site-file.cmake ] ; then
I'm afraid we have a significant lack of trust when it comes to the
underlying build systems. I appreciate this patch can make it "faster"
under some circumstances, it can also introduce bugs if dependencies
aren't correct and things don't rebuild. We have a preference to try an
ensure things are correct. As such I'm not sure we want to make this
change.
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [poky] [PATCH] cmake.bbclass: don't remove build directory for out-of-tree builds
2020-10-27 13:18 ` [poky] " Richard Purdie
@ 2020-10-28 9:00 ` Alvin Sipraga
0 siblings, 0 replies; 3+ messages in thread
From: Alvin Sipraga @ 2020-10-28 9:00 UTC (permalink / raw)
To: Richard Purdie, poky
On 10/27/20 2:18 PM, Richard Purdie wrote:
> On Tue, 2020-10-27 at 13:13 +0000, Alvin Sipraga via lists.yoctoproject.org wrote:
>> Rather than removing the whole of ${WORKDIR}/build on every do_configure
>> step, just clean up CMake files to trigger a fresh reconfiguration of
>> CMake.
>>
>> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
>> ---
>> meta/classes/cmake.bbclass | 8 +-------
>> 1 file changed, 1 insertion(+), 7 deletions(-)
>>
>> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
>> index 7c055e8a3d..39f356099e 100644
>> --- a/meta/classes/cmake.bbclass
>> +++ b/meta/classes/cmake.bbclass
>> @@ -151,13 +151,7 @@ cmake_do_configure() {
>> bbnote "cmake.bbclass no longer uses OECMAKE_BUILDPATH. The default behaviour is now out-of-tree builds with B=WORKDIR/build."
>> fi
>>
>> - if [ "${S}" != "${B}" ]; then
>> - rm -rf ${B}
>> - mkdir -p ${B}
>> - cd ${B}
>> - else
>> - find ${B} -name CMakeFiles -or -name Makefile -or -name cmake_install.cmake -or -name CMakeCache.txt -delete
>> - fi
>> + find ${B} -name CMakeFiles -or -name Makefile -or -name cmake_install.cmake -or -name CMakeCache.txt -delete
>>
>> # Just like autotools cmake can use a site file to cache result that need generated binaries to run
>> if [ -e ${WORKDIR}/site-file.cmake ] ; then
>
> I'm afraid we have a significant lack of trust when it comes to the
> underlying build systems. I appreciate this patch can make it "faster"
> under some circumstances, it can also introduce bugs if dependencies
> aren't correct and things don't rebuild. We have a preference to try an
> ensure things are correct. As such I'm not sure we want to make this
> change.
Hi Richard,
OK, that makes sense, and indeed I expected that that might be the
answer. Thanks anyway for your consideration.
Kind regards,
Alvin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-28 9:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 13:13 [PATCH] cmake.bbclass: don't remove build directory for out-of-tree builds Alvin Sipraga
2020-10-27 13:18 ` [poky] " Richard Purdie
2020-10-28 9:00 ` Alvin Sipraga
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.