summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2017-11-08 03:12:35 +0000
committerGitHub <noreply@github.com>2017-11-08 03:12:35 +0000
commit6ff6e32306a23406cbd8505da3e369e9a56680c9 (patch)
treed897db04644f3df366d70f495517577d64670aea
parentf03f859564f8cd25388ccaf78d88291ae4fb98de (diff)
parent787ce4a146d02ea827e1a72148abf771d52b3a9e (diff)
downloadxmr-stak-6ff6e32306a23406cbd8505da3e369e9a56680c9.zip
xmr-stak-6ff6e32306a23406cbd8505da3e369e9a56680c9.tar.gz
Merge pull request #94 from psychocrypt/fix-cuda9WindowsCompile
fix windows CUDA 9 compile
-rw-r--r--CMakeLists.txt6
-rw-r--r--doc/compile_Windows.md20
2 files changed, 25 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 09b7c13..6e13aa0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -172,6 +172,12 @@ if(CUDA_ENABLE)
# for CUDA 7.5 fix compile error: https://github.com/fireice-uk/xmr-stak/issues/34
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}" "-D_MWAITXINTRIN_H_INCLUDED")
endif()
+
+ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC" AND CUDA_VERSION VERSION_EQUAL 9.0)
+ # workaround find_package(CUDA) is using the wrong path to the CXX host compiler
+ # overwrite the CUDA host compiler variable with the used CXX MSVC
+ set(CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER} CACHE FILEPATH "Host side compiler used by NVCC" FORCE)
+ endif()
else()
message(FATAL_ERROR "selected CUDA compiler '${CUDA_COMPILER}' is not supported")
endif()
diff --git a/doc/compile_Windows.md b/doc/compile_Windows.md
index ffe9e23..056cc50 100644
--- a/doc/compile_Windows.md
+++ b/doc/compile_Windows.md
@@ -20,6 +20,15 @@
- tested version: [cmake 3.9](https://cmake.org/files/v3.9/cmake-3.9.0-rc3-win64-x64.msi)
- during the install choose the option `Add CMake to the system PATH for all users`
+### Cuda 8.0+ (only needed to use NVIDIA GPUs)
+
+- donwload and install [https://developer.nvidia.com/cuda-downloads](https://developer.nvidia.com/cuda-downloads)
+- for minimal install choose `Custom installation options` during the install and select
+ - CUDA/Develpment
+ - CUDA/Visual Studio Integration (ignore the warning during the install that VS2017 is not supported)
+ - CUDA/Runtime
+ - Driver components
+
### Dependencies OpenSSL/Hwloc and Microhttpd
- download the precompiled binary from [https://github.com/fireice-uk/xmr-stak-dep/releases/download/v1/xmr-stak-dep.zip](https://github.com/fireice-uk/xmr-stak-dep/releases/download/v1/xmr-stak-dep.zip)
@@ -67,7 +76,16 @@
set CMAKE_PREFIX_PATH=C:\xmr-stak-dep\hwloc;C:\xmr-stak-dep\libmicrohttpd;C:\xmr-stak-dep\openssl
mkdir build
cd build
- cmake -G "Visual Studio 15 2017 Win64" -T v140,host=x64 ..
+ ```
+ - with CUDA 8
+ ```
+ cmake -G "Visual Studio 15 2017 Win64" -T v140,host=x64 ..
+ ```
+ - with CUDA 9
+ ```
+ cmake -G "Visual Studio 15 2017 Win64" -T v141,host=x64 ..
+ ```
+ ```
cmake --build . --config Release --target install
cd bin\Release
```
OpenPOWER on IntegriCloud