core: allow having a list of "cmake" candidates

Add the BR2_CMAKE_CANDIDATES variable, containing a list of candidates
to check and use as BR2_CMAKE, if possible.

This allows using "cmake3" on CentOS 7, whose default cmake corresponds
to version 2.8.12. Example:

    $ make BR2_CMAKE_CANDIDATES="cmake cmake3"

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Carlos Santos 2017-05-07 01:32:20 -03:00 committed by Thomas Petazzoni
parent cacc6d0b61
commit 914f75f156

View File

@ -10,9 +10,10 @@
# #
BR2_CMAKE_VERSION_MIN = 3.1 BR2_CMAKE_VERSION_MIN = 3.1
BR2_CMAKE ?= cmake BR2_CMAKE_CANDIDATES ?= cmake
ifeq ($(call suitable-host-package,cmake,\ BR2_CMAKE ?= $(call suitable-host-package,cmake,\
$(BR2_CMAKE_VERSION_MIN) $(BR2_CMAKE)),) $(BR2_CMAKE_VERSION_MIN) $(BR2_CMAKE_CANDIDATES))
ifeq ($(BR2_CMAKE),)
BR2_CMAKE = $(HOST_DIR)/usr/bin/cmake BR2_CMAKE = $(HOST_DIR)/usr/bin/cmake
BR2_CMAKE_HOST_DEPENDENCY = host-cmake BR2_CMAKE_HOST_DEPENDENCY = host-cmake
endif endif