-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
31 lines (21 loc) · 1011 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
31
cmake_minimum_required(VERSION 3.0)
project(ringbuffer-sc4 C)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
set(CMAKE_C_FLAGS_RELEASE "-O3 -march=native")
find_package (psrdada REQUIRED)
find_package (CUDA REQUIRED)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
# expose some variables to the source code
set (ringbuffer_VERSION_MAJOR 1)
set (ringbuffer_VERSION_MINOR 0)
configure_file ("src/config.h.in" "${PROJECT_BINARY_DIR}/config.h")
include_directories ("${PROJECT_BINARY_DIR}")
add_executable(fill_ringbuffer src/fill_ringbuffer.c src/channel_remapping_sc4.c)
target_link_libraries(fill_ringbuffer m)
target_link_libraries(fill_ringbuffer ${PSRDADA_LIBRARIES})
target_link_libraries(fill_ringbuffer ${CUDA_LIBRARIES})
add_executable(send src/send.c)
add_executable(fake src/fake.c)
target_link_libraries(fake ${PSRDADA_LIBRARIES})
target_link_libraries(fake ${CUDA_LIBRARIES})
install(TARGETS fill_ringbuffer send fake RUNTIME DESTINATION bin)