1
0
mirror of https://github.com/fumiama/base16384-sycl.git synced 2026-06-22 13:20:27 +08:00

feat: add -DBUILD=test & test CI

This commit is contained in:
源文雨
2025-10-13 13:54:20 +08:00
parent f49ef918c4
commit 7bbaa213b4
7 changed files with 71 additions and 10 deletions

View File

@@ -5,6 +5,12 @@ set(LOCAL_B14LIBS "")
foreach(CPP_FILE ${CPP_FILES})
# name without .cpp
get_filename_component(TARGET_NAME ${CPP_FILE} NAME_WE)
# Skip test files if BUILD is not "test"
if(NOT BUILD STREQUAL "test" AND TARGET_NAME MATCHES "^test_")
continue()
endif()
message(STATUS "Add CPP lib: ${TARGET_NAME}")
add_library(${TARGET_NAME} STATIC ${CPP_FILE})

View File

@@ -1,7 +1,7 @@
#include <iostream>
#include <sycl/sycl.hpp>
#include "test.hpp"
#include "test/kernels.hpp"
SYCL_EXTERNAL std::uint8_t base16384::test::kernels_basic(uint8_t in) {
in *= in;