-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
26 lines (19 loc) · 966 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
project(MAT_MUL LANGUAGES CXX CUDA)
include_directories ("${PROJECT_SOURCE_DIR}/MatMulOnCPU"
"${PROJECT_SOURCE_DIR}/Common")
add_subdirectory(MatMulOnCPU)
add_subdirectory(Common)
add_executable(MatMul_v1 MatMul_v1.cu)
target_link_libraries(MatMul_v1 PUBLIC MatMulOnCPU Common)
find_package(cuBLAS)
add_executable(MatMul_v2 MatMul_v2.cu)
target_link_libraries(MatMul_v2 PUBLIC MatMulOnCPU Common ${CUBLAS_LIBRARIES})
add_executable(MatMul_v3 MatMul_v3.cu)
target_link_libraries(MatMul_v3 PUBLIC MatMulOnCPU Common)
add_executable(MatMul_v4 MatMul_v4.cu)
target_link_libraries(MatMul_v4 PUBLIC MatMulOnCPU Common)
set_target_properties(MatMul_v1 MatMul_v2 MatMul_v3 MatMul_v4
PROPERTIES CUDA_SEPARABLE_COMPILATION ON
CUDA_ARCHITECTURES "70;70")