-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
72 lines (55 loc) · 1.63 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
cmake_minimum_required(VERSION 3.8)
project(vanity_torv3_cuda LANGUAGES C CXX CUDA)
include(FindCUDA)
if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES "50")
if (CUDA_VERSION VERSION_LESS 9.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES "20;21")
endif()
if (CUDA_VERSION VERSION_LESS 11.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES "30")
elseif(CUDA_VERSION VERSION_LESS 12.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES "35")
endif()
if (NOT CUDA_VERSION VERSION_LESS 8.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES "60")
endif()
if (NOT CUDA_VERSION VERSION_LESS 9.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES "70")
endif()
if (NOT CUDA_VERSION VERSION_LESS 10.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES "75")
endif()
if (NOT CUDA_VERSION VERSION_LESS 11.0)
list(APPEND CMAKE_CUDA_ARCHITECTURES "80")
endif()
if (NOT CUDA_VERSION VERSION_LESS 11.1)
list(APPEND CMAKE_CUDA_ARCHITECTURES "86")
endif()
if (NOT CUDA_VERSION VERSION_LESS 11.5)
list(APPEND CMAKE_CUDA_ARCHITECTURES "87")
endif()
if (NOT CUDA_VERSION VERSION_LESS 11.8)
list(APPEND CMAKE_CUDA_ARCHITECTURES "90")
endif()
list(SORT CMAKE_CUDA_ARCHITECTURES ORDER DESCENDING)
endif()
if (${CMAKE_VERSION} VERSION_GREATER "3.5.2")
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT vanity_torv3_cuda)
endif()
set(HEADERS
src/crypto-ops.h
src/gpu_crypto.h
src/gpu_keccak.h
src/gpu_scan.h
src/keccak.h
)
set(SOURCES
src/crypto-ops-data.c
src/crypto-ops.c
src/keccak.cpp
src/main.cu
)
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} --threads 0" )
include_directories(src)
add_executable(${CMAKE_PROJECT_NAME} ${HEADERS} ${SOURCES})