From 8d313484e488b9f2be5be9150bb05234e2b9f77c Mon Sep 17 00:00:00 2001 From: psychocrypt Date: Wed, 11 Oct 2017 21:25:48 +0200 Subject: fix cuda 7.5 compile fix error: `identifier "__builtin_ia32_monitorx" is undefined` --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a3df96..c23fce3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,7 +142,11 @@ if(CUDA_ENABLE) if(CUDA_KEEP_FILES) set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}" --keep --keep-dir "${PROJECT_BINARY_DIR}") endif(CUDA_KEEP_FILES) - + + if(CUDA_VERSION VERSION_LESS 8.0) + # 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() else() message(FATAL_ERROR "selected CUDA compiler '${CUDA_COMPILER}' is not supported") endif() -- cgit v1.1