2022-01-12 00:01:42 +08:00
|
|
|
cmake_minimum_required(VERSION 3.1)
|
|
|
|
|
|
|
|
# C project
|
|
|
|
project(
|
|
|
|
HostTranslation
|
|
|
|
DESCRIPTION "Translate CUDA host modules to CPU host modules,
|
|
|
|
mainly replace CUDA Runtime APIs with CPU Runtime APIs"
|
|
|
|
LANGUAGES CXX)
|
|
|
|
|
|
|
|
set(CMAKE_VERBOSE_MAKEFILE ON)
|
|
|
|
set(LIB_NAME cudaRuntime2cpuRuntime)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
2023-12-14 03:29:17 +08:00
|
|
|
include_directories(./include/cpu)
|
2022-09-16 06:19:13 +08:00
|
|
|
include_directories(../../common)
|
2022-01-12 00:01:42 +08:00
|
|
|
|
2023-12-14 03:29:17 +08:00
|
|
|
file(GLOB proj_HEADERS "include/cpu/*.h")
|
|
|
|
file(GLOB proj_SOURCES "src/cpu/*.cpp")
|
2022-01-12 00:01:42 +08:00
|
|
|
|
|
|
|
# Add core library.
|
|
|
|
add_library(${LIB_NAME} SHARED ${proj_HEADERS} ${proj_SOURCES})
|