summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
1 files changed, 12 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 15a2684..784c0bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -148,6 +148,11 @@ if(CUDA_ENABLE)
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++11")
endif()
+ # avoid that nvcc in CUDA 8 complains about sm_20 pending removal
+ if(CUDA_VERSION VERSION_EQUAL 8.0)
+ set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -Wno-deprecated-gpu-targets")
+ endif()
+
# avoid that nvcc in CUDA < 8 tries to use libc `memcpy` within the kernel
if(CUDA_VERSION VERSION_LESS 8.0)
add_definitions(-D_FORCE_INLINES)
@@ -522,8 +527,8 @@ else()
add_executable(xmr-stak ${SRCFILES_CPP})
endif()
-set(EXECUTABLE_OUTPUT_PATH "bin")
-set(LIBRARY_OUTPUT_PATH "bin")
+set(EXECUTABLE_OUTPUT_PATH "bin" CACHE STRING "Path to place executables relative to ${CMAKE_INSTALL_PREFIX}")
+set(LIBRARY_OUTPUT_PATH "bin" CACHE STRING "Path to place libraries relative to ${CMAKE_INSTALL_PREFIX}")
target_link_libraries(xmr-stak ${LIBS} xmr-stak-c xmr-stak-backend)
@@ -535,23 +540,23 @@ target_link_libraries(xmr-stak ${LIBS} xmr-stak-c xmr-stak-backend)
# do not install the binary if the project and install are equal
if( NOT CMAKE_INSTALL_PREFIX STREQUAL PROJECT_BINARY_DIR )
install(TARGETS xmr-stak
- RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
+ RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${EXECUTABLE_OUTPUT_PATH}")
if(CUDA_FOUND)
if(WIN32)
install(TARGETS xmrstak_cuda_backend
- RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
+ RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}")
else()
install(TARGETS xmrstak_cuda_backend
- LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
+ LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}")
endif()
endif()
if(OpenCL_FOUND)
if(WIN32)
install(TARGETS xmrstak_opencl_backend
- RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
+ RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}")
else()
install(TARGETS xmrstak_opencl_backend
- LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
+ LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBRARY_OUTPUT_PATH}")
endif()
endif()
else()
OpenPOWER on IntegriCloud