-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
30 lines (25 loc) · 1003 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cmake_minimum_required(VERSION 3.10)
project(fabtsuite_transfer)
set(CMAKE_C_STANDARD 11)
# Optimization and symbol flags are added via CMake configs
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_POSIX_C_SOURCE=200809L")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -Wextra -Werror")
include_directories(${LIBFABRIC_INCLUDE_DIRS} ../hlog)
add_executable(fabtget fabtget.c)
message(STATUS "LIBFABRIC_LIBDIR=${LIBFABRIC_LIBDIR}")
target_link_directories(fabtget PUBLIC ../hlog ${LIBFABRIC_LIBDIR})
message(STATUS "LIBFABRIC_LIBRARIES=${LIBFABRIC_LIBRARIES}")
target_link_libraries(fabtget hlog ${LIBFABRIC_LIBRARIES})
install(TARGETS fabtget RUNTIME DESTINATION bin)
install(CODE "execute_process(
COMMAND bash -c \"set -e
cd $DESTDIR/${CMAKE_INSTALL_PREFIX}/bin/
echo -n .. Installing: `pwd`
ln -sv fabtget fabtput
\")")
file(GLOB TEST_SCRIPTS
"../test/*"
)
file(COPY ${TEST_SCRIPTS} DESTINATION .)
include(CMakeTests.cmake)