Skip to content

Commit

Permalink
add a cmakelist file for cuSolverRfBatch
Browse files Browse the repository at this point in the history
  • Loading branch information
zishun committed Aug 5, 2020
1 parent 305de12 commit 66601fd
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cuSolverRf
cuSolverRfBatch
build/
*.user

# Prerequisites
*.d
Expand Down
37 changes: 37 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
cmake_minimum_required(VERSION 3.10)

set(PROJECT_NAME cuSolverRfBatch)
project (${PROJECT_NAME} LANGUAGES C CXX CUDA)

set(SRC_FILES
mmio_wrapper.cpp
cuSolverRfBatch.cpp
)

add_executable(${PROJECT_NAME} ${SRC_FILES})
add_library(mmio mmio.c)

# CUDA
find_library(CUDA_LIBRARY_CUDART cudart ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
find_library(CUDA_LIBRARY_CUSOLVER cusolver ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
find_library(CUDA_LIBRARY_CUSPARSE cusparse ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
target_include_directories(
${PROJECT_NAME}
PRIVATE
${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
"./inc/"
)
target_link_libraries(
${PROJECT_NAME}
${CUDA_LIBRARY_CUDART}
${CUDA_LIBRARY_CUSOLVER}
${CUDA_LIBRARY_CUSPARSE}
mmio
)

if (MSVC)
add_compile_options("$<$<CONFIG:RELEASE>:/O2>")
endif (MSVC)
if (UNIX)
# todo
endif (UNIX)

0 comments on commit 66601fd

Please sign in to comment.