mirror of
https://github.com/ceph/ceph
synced 2025-03-20 17:27:01 +00:00
cmake: use make explicitly to build fio
we cannot assume that user uses "make" as the generator of cmake, if, for instance, ninja is used, `$(MAKE)` is not a valid variable in the generated `build.ninja`. so we should use "make" explicitly. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
4052b11f18
commit
b6bae7ba13
@ -5,6 +5,10 @@ function(build_fio)
|
||||
if(ALLOCATOR)
|
||||
set(FIO_EXTLIBS EXTLIBS=-l${ALLOCATOR})
|
||||
endif()
|
||||
|
||||
include(FindMake)
|
||||
find_make("MAKE_EXECUTABLE" "make_cmd")
|
||||
|
||||
ExternalProject_Add(fio_ext
|
||||
DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/src/
|
||||
UPDATE_COMMAND "" # this disables rebuild on each run
|
||||
@ -15,6 +19,6 @@ function(build_fio)
|
||||
SOURCE_DIR ${CMAKE_BINARY_DIR}/src/fio
|
||||
BUILD_IN_SOURCE 1
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/configure
|
||||
BUILD_COMMAND $(MAKE) fio EXTFLAGS=-Wno-format-truncation ${FIO_EXTLIBS}
|
||||
BUILD_COMMAND ${make_cmd} fio EXTFLAGS=-Wno-format-truncation ${FIO_EXTLIBS}
|
||||
INSTALL_COMMAND cp <BINARY_DIR>/fio ${CMAKE_BINARY_DIR}/bin)
|
||||
endfunction()
|
||||
|
Loading…
Reference in New Issue
Block a user