]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | function(build_fio) |
2 | # we use an external project and copy the sources to bin directory to ensure | |
3 | # that object files are built outside of the source tree. | |
4 | include(ExternalProject) | |
5 | if(ALLOCATOR) | |
6 | set(FIO_EXTLIBS EXTLIBS=-l${ALLOCATOR}) | |
7 | endif() | |
8 | ExternalProject_Add(fio_ext | |
9 | DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/src/ | |
10 | UPDATE_COMMAND "" # this disables rebuild on each run | |
11 | GIT_REPOSITORY "https://github.com/axboe/fio.git" | |
9f95a23c | 12 | GIT_TAG "fio-3.15" |
11fdf7f2 TL |
13 | SOURCE_DIR ${CMAKE_BINARY_DIR}/src/fio |
14 | BUILD_IN_SOURCE 1 | |
15 | CONFIGURE_COMMAND <SOURCE_DIR>/configure | |
16 | BUILD_COMMAND $(MAKE) fio EXTFLAGS=-Wno-format-truncation ${FIO_EXTLIBS} | |
17 | INSTALL_COMMAND cp <BINARY_DIR>/fio ${CMAKE_BINARY_DIR}/bin) | |
18 | endfunction() |