summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorpsychocrypt <psychocrypt@users.noreply.github.com>2017-11-14 22:13:24 +0100
committerpsychocrypt <psychocrypt@users.noreply.github.com>2017-11-15 16:29:41 +0100
commit70737c8d1a909c6d08f6e38e069566ae8af64917 (patch)
tree50df29d60399e7843a69d343fddc1efc00e11d87 /CMakeLists.txt
parent0659458523671d53e4eddd940ade8ac9f72b1bbe (diff)
downloadxmr-stak-70737c8d1a909c6d08f6e38e069566ae8af64917.zip
xmr-stak-70737c8d1a909c6d08f6e38e069566ae8af64917.tar.gz
check gpu architecture
- check if the gpu architecture is supported by the compiled miner binary - remove not supported gpus from the auto suggestion - disallow the selection of a not supported gpu by hand tuning the config
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6e0f282..09c7cec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,6 +109,10 @@ if(CUDA_ENABLE)
endif()
set(CUDA_ARCH "${DEFAULT_CUDA_ARCH}" CACHE STRING "Set GPU architecture (semicolon separated list, e.g. '-DCUDA_ARCH=20;35;60')")
+ # generate comma separated list with architectures
+ string(REPLACE ";" "+" STR_CUDA_ARCH "${CUDA_ARCH}")
+ add_definitions("-DXMRSTAK_CUDA_ARCH_LIST=${STR_CUDA_ARCH}")
+
# validate architectures (only numbers are allowed)
foreach(CUDA_ARCH_ELEM ${CUDA_ARCH})
string(REGEX MATCH "^[0-9]+$" IS_NUMBER ${CUDA_ARCH})
OpenPOWER on IntegriCloud