-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a cmakelist file for cuSolverRfBatch
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
cuSolverRf | ||
cuSolverRfBatch | ||
build/ | ||
*.user | ||
|
||
# Prerequisites | ||
*.d | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |