Commit 545d47f0 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼

ci: some tweaks to fix unit-tests

parent fc7c1e08
Pipeline #69525 passed with stages
in 3 minutes and 18 seconds
......@@ -63,6 +63,7 @@ test:unit:
stage: test
tags:
- villas-fpga
- cuda
allow_failure: true
script: |
rm -r build && mkdir build && cd build && cmake3 .. && make unit-tests -j8
......
......@@ -29,6 +29,10 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
# GPU library is optional, check for CUDA presence
include(CheckLanguage)
check_language(CUDA)
include_directories(thirdparty/CLI11)
include_directories(thirdparty/rang)
......
......@@ -55,10 +55,6 @@ add_library(villas-fpga SHARED ${SOURCES})
target_link_libraries(villas-fpga PUBLIC villas-common)
# 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)
......
......@@ -31,13 +31,14 @@ set(SOURCES
timer.cpp
)
add_executable(unit-tests ${SOURCES})
if(CMAKE_CUDA_COMPILER)
enable_language(CUDA)
list(APPEND SOURCES gpu.cpp gpu_kernels.cu)
target_sources(unit-tests PRIVATE
gpu.cpp gpu_kernels.cu)
endif()
add_executable(unit-tests ${SOURCES})
find_package(Criterion REQUIRED)
target_include_directories(unit-tests PUBLIC
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment