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:
@@ -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})
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user