Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
VILLASframework
VILLASfpga
VILLASfpga
Commits
4e4f93d1
Commit
4e4f93d1
authored
May 16, 2018
by
Daniel Krebs
Browse files
cmake: only build GPU library if CUDA is present
parent
dd485559
Pipeline
#49418
failed with stages
in 49 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/CMakeLists.txt
View file @
4e4f93d1
add_subdirectory
(
common
)
add_subdirectory
(
gpu
)
set
(
SOURCES
vlnv.cpp
...
...
@@ -36,7 +35,16 @@ find_package(Threads)
add_library
(
villas-fpga SHARED
${
SOURCES
}
)
target_link_libraries
(
villas-fpga PUBLIC villas-common
)
target_link_libraries
(
villas-fpga PUBLIC villas-gpu
)
# GPU library is optional, check for CUDA presence
include
(
CheckLanguage
)
check_language
(
CUDA
)
if
(
CMAKE_CUDA_COMPILER
)
add_subdirectory
(
gpu
)
target_link_libraries
(
villas-fpga PUBLIC villas-gpu
)
else
()
message
(
"No CUDA support, not building GPU library"
)
endif
()
target_compile_definitions
(
villas-fpga PRIVATE
BUILDID=\"abc\"
...
...
tests/CMakeLists.txt
View file @
4e4f93d1
...
...
@@ -4,7 +4,6 @@ set(SOURCES
logging.cpp
dma.cpp
fifo.cpp
gpu.cpp
# hls.c
# intc.c
# rtds_rtt.c
...
...
@@ -13,6 +12,10 @@ set(SOURCES
graph.cpp
)
if
(
CMAKE_CUDA_COMPILER
)
list
(
APPEND SOURCES gpu.cpp
)
endif
()
add_executable
(
unit-tests
${
SOURCES
}
)
find_package
(
Criterion REQUIRED
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment