pkg/ccn-lite: check for minimal cmake version
ccn-lite does not build with cmake < 3.6.0. This checks for a minimal version
instead of failing to compile.
cmake version 3.5.2 is not >= to minimal required 3.6.0
Makefile:25: recipe for target '..cmake_version_supported' failed
Tested with versions 3.5.2, 3.6.0-rc1, 3.6.0, 3.6.3, 3.7.0-rc1, 3.7.0.
Note: the check used does not consider '-rcX' as 'sort -V' does not handle them
properly.
This commit is contained in:
parent
a3c7d26a7d
commit
b0986d91ff
@ -3,7 +3,10 @@ PKG_URL=https://github.com/cn-uofbasel/ccn-lite/
|
|||||||
PKG_VERSION=f85a2a055db92b5978f2d4f92b830b5b6b9acb42
|
PKG_VERSION=f85a2a055db92b5978f2d4f92b830b5b6b9acb42
|
||||||
PKG_LICENSE=ISC
|
PKG_LICENSE=ISC
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all ..cmake_version_supported
|
||||||
|
|
||||||
|
CMAKE_MINIMAL_VERSION = 3.6.0
|
||||||
|
|
||||||
|
|
||||||
RIOT_CFLAGS = $(INCLUDES)
|
RIOT_CFLAGS = $(INCLUDES)
|
||||||
|
|
||||||
@ -17,10 +20,18 @@ $(PKG_BUILDDIR)/src/Makefile: $(TOOLCHAIN_FILE)
|
|||||||
cd $(PKG_BUILDDIR)/src && \
|
cd $(PKG_BUILDDIR)/src && \
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN_FILE) \
|
cmake -DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN_FILE) \
|
||||||
-DCCNL_RIOT=1 -DRIOT_CFLAGS="$(RIOT_CFLAGS)" -DBUILD_TESTING=OFF .
|
-DCCNL_RIOT=1 -DRIOT_CFLAGS="$(RIOT_CFLAGS)" -DBUILD_TESTING=OFF .
|
||||||
|
|
||||||
$(TOOLCHAIN_FILE): git-download
|
$(TOOLCHAIN_FILE): git-download
|
||||||
$(RIOTTOOLS)/cmake/generate-xcompile-toolchain.sh > $(TOOLCHAIN_FILE)
|
$(RIOTTOOLS)/cmake/generate-xcompile-toolchain.sh > $(TOOLCHAIN_FILE)
|
||||||
|
|
||||||
|
git-download: | ..cmake_version_supported
|
||||||
|
|
||||||
|
..cmake_version_supported:
|
||||||
|
@ # Remove '-rcX' from version as they are not well handled
|
||||||
|
$(Q)\
|
||||||
|
CMAKE_VERSION=$$(cmake --version | sed -n '1 {s/cmake version //;s/-rc.*//;p;}'); \
|
||||||
|
$(RIOTTOOLS)/has_minimal_version/has_minimal_version.sh "$${CMAKE_VERSION}" "$(CMAKE_MINIMAL_VERSION)" cmake
|
||||||
|
|
||||||
|
|
||||||
include $(RIOTBASE)/pkg/pkg.mk
|
include $(RIOTBASE)/pkg/pkg.mk
|
||||||
ifneq (,$(filter -Wformat-nonliteral -Wformat=2, $(CFLAGS)))
|
ifneq (,$(filter -Wformat-nonliteral -Wformat=2, $(CFLAGS)))
|
||||||
CFLAGS += -Wno-format-nonliteral
|
CFLAGS += -Wno-format-nonliteral
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user