Fix problem building rdma-core. 00/18600/3
authorThomas F Herbert <therbert@redhat.com>
Fri, 29 Mar 2019 19:41:48 +0000 (15:41 -0400)
committerThomas F Herbert <therbert@redhat.com>
Wed, 3 Apr 2019 16:45:45 +0000 (12:45 -0400)
Recent patches add rdma-core.
They are not building in Centos because of differences
in cmake. This patch fixes that problem by defining
CMAKE for all external builds.

Change-Id: I3eea869226385207500c5a1217bd7330140ca462
Signed-off-by: Thomas F Herbert <therbert@redhat.com>
build/external/Makefile
build/external/packages/rdma-core.mk

index aed8b2e..c56e16d 100644 (file)
@@ -27,6 +27,12 @@ JOBS := $(if $(shell [ -f /proc/cpuinfo ] && head /proc/cpuinfo),\
 B := $(BUILD_DIR)
 I := $(INSTALL_DIR)
 
+ifneq ($(shell which cmake3),)
+CMAKE?=cmake3
+else
+CMAKE?=cmake
+endif
+
 include packages.mk
 include packages/nasm.mk
 include packages/ipsec-mb.mk
index 0e8c878..d3363e1 100644 (file)
@@ -28,14 +28,14 @@ RDMA_FILES := include/infiniband/verbs.h \
 
 define  rdma-core_config_cmds
        cd $(rdma-core_build_dir) && \
-         cmake -G Ninja $(rdma-core_src_dir) \
+         $(CMAKE) -G Ninja $(rdma-core_src_dir) \
            -DENABLE_STATIC=1 -DENABLE_RESOLVE_NEIGH=0 -DNO_PYVERBS=1 -DENABLE_VALGRIND=0 \
            -DCMAKE_BUILD_TYPE=RelWithDebInfo \
            -DCMAKE_C_FLAGS=-fPIC > $(rdma-core_config_log)
 endef
 
 define  rdma-core_build_cmds
-       cmake --build $(rdma-core_build_dir) -- libibverbs.a libmlx5.a > $(rdma-core_build_log)
+       $(CMAKE) --build $(rdma-core_build_dir) -- libibverbs.a libmlx5.a > $(rdma-core_build_log)
 endef
 
 define  rdma-core_install_cmds