cmake_minimum_required(VERSION 3.5)

project(fastllm LANGUAGES CXX)

option(USE_CUDA "use cuda" ON)

message(STATUS "USE_CUDA: ${USE_CUDA}")

set(CMAKE_BUILD_TYPE "Release")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread --std=c++17 -O2 -g ")

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-copy-dt-needed-entries")

message(STATUS "CMAKE_CXX_FLAGS" ${CMAKE_CXX_FLAGS})
# 指定动态库位置
LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/lib)
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")

#enable_language(CUDA)
add_compile_definitions(USE_CUDA)

include_directories(include /opt/dtk-23.04/cuda/include/)

add_executable(main main.cpp)
target_link_libraries(main fastllm)

add_executable(quant quant.cpp)
target_link_libraries(quant fastllm)

add_executable(benchmark benchmark/benchmark.cpp)
target_link_libraries(benchmark fastllm)


