2018-06-25 17:03:09 +02:00
|
|
|
## CMakeLists.txt
|
|
|
|
#
|
2023-01-07 17:20:15 +01:00
|
|
|
# Author: Daniel Krebs <github@daniel-krebs.net>
|
2023-09-08 11:35:18 +02:00
|
|
|
# SPDX-FileCopyrightText: 2018 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
2023-01-07 17:20:15 +01:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2018-06-25 17:03:09 +02:00
|
|
|
|
2018-08-21 15:53:47 +02:00
|
|
|
add_subdirectory(thirdparty/gdrcopy)
|
2018-04-13 15:59:34 +02:00
|
|
|
|
2018-08-21 15:53:47 +02:00
|
|
|
add_library(villas-gpu
|
2024-02-29 21:40:05 +01:00
|
|
|
SHARED
|
|
|
|
src/gpu.cpp
|
|
|
|
src/kernels.cu
|
2018-08-21 15:53:47 +02:00
|
|
|
)
|
2018-05-15 17:35:45 +02:00
|
|
|
|
|
|
|
target_compile_options(villas-gpu PRIVATE -g)
|
|
|
|
|
2018-08-21 15:53:47 +02:00
|
|
|
set_source_files_properties(src/gpu.cpp PROPERTIES
|
2024-02-29 21:40:05 +01:00
|
|
|
LANGUAGE CUDA
|
2018-08-21 15:53:47 +02:00
|
|
|
)
|
2018-05-15 17:35:45 +02:00
|
|
|
|
2018-08-21 15:53:47 +02:00
|
|
|
target_include_directories(villas-gpu
|
2024-02-29 21:40:05 +01:00
|
|
|
PRIVATE
|
|
|
|
/opt/cuda/include
|
2018-08-21 15:53:47 +02:00
|
|
|
)
|
2018-05-15 17:35:45 +02:00
|
|
|
|
|
|
|
target_link_libraries(villas-gpu
|
2024-02-29 21:40:05 +01:00
|
|
|
PUBLIC
|
|
|
|
villas-common
|
|
|
|
gdrapi
|
|
|
|
cuda
|
2018-08-21 15:53:47 +02:00
|
|
|
)
|
2018-04-13 15:59:34 +02:00
|
|
|
|
|
|
|
target_include_directories(villas-gpu
|
2024-02-29 21:40:05 +01:00
|
|
|
PUBLIC
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/include
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}
|
2018-08-21 15:53:47 +02:00
|
|
|
)
|