mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
ci: some tweaks to fix unit-tests
This commit is contained in:
parent
d191a86c18
commit
3f119896e9
4 changed files with 9 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue