* [Buildroot] Is there a way to alter BR2_CMAKE_VERSION_MIN?
@ 2020-06-23 18:36 Asaf Kahlon
2020-06-23 19:04 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: Asaf Kahlon @ 2020-06-23 18:36 UTC (permalink / raw)
To: buildroot
Hello,
Currently, BR2_CMAKE_VERSION_MIN is set to 3.10.
On my machine I have cmake=3.12 and on my BR2_EXTERNAL tree I have
some private packages requiring cmake>=3.13.
In the current state, Buildroot won't build host-cmake since the
installed one is greater than 3.10, but still the compilation fails
because those packages need a higher version from what I have on my
machine.
Is there a reason why BR2_CMAKE_VERSION_MIN isn't set with "?=" but
with "="? Setting it with "?=" gives the user the option to change it
in case there are private packages which need a higher version of
CMake.
Any other ideas on how to overcome this issue?
Thanks,
Asaf.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Buildroot] Is there a way to alter BR2_CMAKE_VERSION_MIN?
2020-06-23 18:36 [Buildroot] Is there a way to alter BR2_CMAKE_VERSION_MIN? Asaf Kahlon
@ 2020-06-23 19:04 ` Yann E. MORIN
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2020-06-23 19:04 UTC (permalink / raw)
To: buildroot
Asaf, All,
On 2020-06-23 21:36 +0300, Asaf Kahlon spake thusly:
> Currently, BR2_CMAKE_VERSION_MIN is set to 3.10.
> On my machine I have cmake=3.12 and on my BR2_EXTERNAL tree I have
> some private packages requiring cmake>=3.13.
> In the current state, Buildroot won't build host-cmake since the
> installed one is greater than 3.10, but still the compilation fails
> because those packages need a higher version from what I have on my
> machine.
>
> Is there a reason why BR2_CMAKE_VERSION_MIN isn't set with "?=" but
> with "="? Setting it with "?=" gives the user the option to change it
> in case there are private packages which need a higher version of
> CMake.
>
> Any other ideas on how to overcome this issue?
We already had the discussion a while ago on the IRC channel, and IIRC,
the conclusion was that we wanted to move to a per-package minimum
version, for example:
LIBFOO_CMAKE_REQUIRED_VERSION = 3.12
And the the cmake-package infra would automatically add host-cmake as a
dependency of libfoo if the host cmake is not suitable. Probably with
some code like:
$(2)_CMAKE = $$(shell support/dependencies/check-host-cmake.sh $$($(2)_CMAKE_REQUIRED_VERSION) $$(BR2_CMAKE_CANDIDATES))
ifeq ($$($(2)_CMAKE),)
$(2)_DEPENDENCIES += host-cmake
$(2)_CMAKE = $(HOST_DIR)/bin/cmake
endif
And then, remove:
$(2)_DEPENDENCIES += $(BR2_CMAKE_HOST_DEPENDENCY)
And change calls to $$(BR2_CMAKE) with calls to $$($(2)_CMAKE)
Then move the definition of BR2_CMAKE_CANDIDATES to pkg-cmake.mk
Expand all the packages that use cmake-package to define the version
they need.
And finally, kill support/dependencies/check-host-cmake.mk, tp keep only
support/dependencies/check-host-cmake.sh
Obviously, that will be a multi-patch, long effort...
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-23 19:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-23 18:36 [Buildroot] Is there a way to alter BR2_CMAKE_VERSION_MIN? Asaf Kahlon
2020-06-23 19:04 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox