This repository has been archived by the owner on Mar 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
58 lines (45 loc) · 1.61 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
cmake_minimum_required(VERSION 3.13.4)
file(STRINGS version.txt PSRDada_VERSION)
# Project configuration, specifying version, languages,
project(PSRDada LANGUAGES C VERSION ${PSRDada_VERSION})
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
if(DEFINED ENV{PSRHOME})
SET(CMAKE_INSTALL_PREFIX $ENV{PSRHOME})
endif(DEFINED ENV{PSRHOME})
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
message(STATUS "Building PSRDada ${PSRDada_VERSION} into ${CMAKE_INSTALL_PREFIX}")
set(CMAKE_PROJECT_HOMEPAGE_URL http://psrdada.sourceforge.net/)
set(CMAKE_PROJECT_DESCRIPTION "PSRDADA: Distributed Data Acquisition")
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
include(dependencies)
include(CTest)
find_dependencies()
find_package(CUDAToolkit)
find_package(rdmacm)
find_package(HWLOC)
if (RDMACM_FOUND)
set(HAVE_RDMACM on)
endif()
if (CUDAToolkit_FOUND)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES "60;75;80")
endif()
enable_language(CUDA)
set(HAVE_CUDA on)
endif()
if (HWLOC_FOUND)
set(HAVE_HWLOC on)
endif()
set(HAVE_SYS_STATVFS_H on)
set(HAVE_SYS_VFS_H on)
configure_file(cmake_config.h.in config.h)
include(GNUInstallDirs)
add_subdirectory(src)
add_subdirectory(apps)
add_subdirectory(Management)
# ---------------------------------------------------------------------------------------
# Install
# ---------------------------------------------------------------------------------------
export(TARGETS psrdada FILE "${CMAKE_CURRENT_BINARY_DIR}/PSRDadaConfig.cmake")
install(EXPORT PSRDadaConfig DESTINATION "${CMAKE_INSTALL_DATADIR}/PSRDada/cmake")