forked from linux-rdma/rdma-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
63 lines (51 loc) · 1.92 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
rdma_subst_install(FILES rdma-load-modules@.service.in
DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}"
RENAME rdma-load-modules@.service
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
rdma_subst_install(FILES "rdma-hw.target.in"
RENAME "rdma-hw.target"
DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}"
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
install(FILES
modules/infiniband.conf
modules/iwarp.conf
modules/opa.conf
modules/rdma.conf
modules/roce.conf
DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/rdma/modules")
install(FILES "rdma-persistent-naming.rules"
RENAME "60-rdma-persistent-naming.rules"
DESTINATION "${CMAKE_INSTALL_UDEV_RULESDIR}")
install(FILES "rdma-description.rules"
RENAME "75-rdma-description.rules"
DESTINATION "${CMAKE_INSTALL_UDEV_RULESDIR}")
install(FILES "rdma-hw-modules.rules"
RENAME "90-rdma-hw-modules.rules"
DESTINATION "${CMAKE_INSTALL_UDEV_RULESDIR}")
install(FILES "rdma-ulp-modules.rules"
RENAME "90-rdma-ulp-modules.rules"
DESTINATION "${CMAKE_INSTALL_UDEV_RULESDIR}")
install(FILES "rdma-umad.rules"
RENAME "90-rdma-umad.rules"
DESTINATION "${CMAKE_INSTALL_UDEV_RULESDIR}")
# This file is intended to be customized by the user, so it is installed in
# /etc/
install(FILES "persistent-ipoib.rules"
RENAME "70-persistent-ipoib.rules"
DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
# Create an installed executable (under /usr/lib/udev)
function(rdma_udev_executable EXEC)
add_executable(${EXEC} ${ARGN})
target_link_libraries(${EXEC} LINK_PRIVATE ${COMMON_LIBS})
set_target_properties(${EXEC} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${BUILD_BIN}")
install(TARGETS ${EXEC} DESTINATION "${CMAKE_INSTALL_UDEV_RULESDIR}/../")
endfunction()
if (NOT NL_KIND EQUAL 0)
rdma_udev_executable(rdma_rename
rdma_rename.c
)
target_link_libraries(rdma_rename LINK_PRIVATE
${NL_LIBRARIES}
)
endif()