cmake/modules: look for GNU make first instead of BSD make

* BuildDPDK.cmake, BuildSPDK.cmake:
      * give priority to build with gmake
      * throw error if make not found

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
This commit is contained in:
Deepika Upadhyay 2019-11-22 19:51:55 +05:30
parent a930706aa6
commit abf3dc0cf9
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,8 @@
function(do_build_dpdk dpdk_dir)
find_program (MAKE_EXECUTABLE NAMES make gmake)
find_program(MAKE_EXECUTABLE NAMES gmake make)
if(NOT MAKE_EXECUTABLE)
message(FATAL_ERROR "Can't find make")
endif()
# mk/machine/native/rte.vars.mk
# rte_cflags are extracted from mk/machine/${machine}/rte.vars.mk
# only 3 of them have -march=<arch> defined, so copying them here.

View File

@ -10,7 +10,10 @@ macro(build_spdk)
find_package(uuid REQUIRED)
endif()
find_program (MAKE_EXECUTABLE NAMES make gmake)
find_program(MAKE_EXECUTABLE NAMES gmake make)
if(NOT MAKE_EXECUTABLE)
message(FATAL_ERROR "Can't find make")
endif()
if(CMAKE_MAKE_PROGRAM MATCHES "make")
# try to inherit command line arguments passed by parent "make" job
set(make_cmd "$(MAKE)")