-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
37 lines (28 loc) · 1 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
cmake_minimum_required(VERSION 3.0)
project(dadafits C)
set(CMAKE_C_FLAGS_RELEASE "-O3 -march=native")
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
find_package (psrdada REQUIRED)
find_package (cfitsio REQUIRED)
find_package (CUDA REQUIRED)
# expose some variables to the source code
set (dadafits_VERSION_MAJOR 1)
set (dadafits_VERSION_MINOR 0)
configure_file ("src/config.h.in" "${PROJECT_BINARY_DIR}/config.h")
include_directories ("${PROJECT_BINARY_DIR}")
include_directories ("${CFITSIO_INCLUDE_DIR}")
add_executable(dadafits
src/main.c
src/downsample.c
src/sb_util.c
src/fits_io.c
src/manipulate.c
src/dadafits_internal.h
)
add_executable(fits_dump
src/fits_dump.c
)
target_link_libraries(dadafits ${PSRDADA_LIBRARIES} ${CUDA_LIBRARIES} ${CFITSIO_LIBRARIES} -lm)
target_link_libraries(fits_dump ${PSRDADA_LIBRARIES} ${CUDA_LIBRARIES} ${CFITSIO_LIBRARIES})
install(TARGETS dadafits RUNTIME DESTINATION bin)
install(TARGETS fits_dump RUNTIME DESTINATION bin)